Fix dart/flutter stack trace parsing

This commit is contained in:
Michal Dorner 2021-02-01 16:09:01 +01:00
parent 2834fd0c5f
commit effa386fea
No known key found for this signature in database
GPG key ID: 9EEE04B48DA36786
6 changed files with 38 additions and 25 deletions

View file

@ -40,9 +40,9 @@ test\\\\main_test.dart 13:9 main.<fn>.<fn>.<fn>
"details": "package:darttest/main.dart 2:3 throwError
test\\\\main_test.dart 17:9 main.<fn>.<fn>.<fn>
",
"line": 2,
"line": 17,
"message": "Exception: Some error",
"path": "lib/main.dart",
"path": "test/main_test.dart",
},
"name": "Test 1 Test 1.1 Exception in target unit",
"result": "failed",
@ -159,7 +159,7 @@ When the exception was thrown, this was the stack:
The test description was:
pass updateShouldNotify
════════════════════════════════════════════════════════════════════════════════════════════════════",
"line": 94,
"line": 112,
"message": "Test failed. See exception logs above.
The test description was: pass updateShouldNotify",
"path": "test/value_listenable_provider_test.dart",

View file

@ -19,7 +19,7 @@ describe('dart-json tests', () => {
const filePath = normalizeFilePath(path.relative(__dirname, fixturePath))
const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'})
const parser = new DartJsonParser(opts)
const parser = new DartJsonParser(opts, 'dart')
const result = await parser.parse(filePath, fileContent)
expect(result).toMatchSnapshot()
@ -42,7 +42,7 @@ describe('dart-json tests', () => {
workDir: '/__w/provider/provider/'
}
const parser = new DartJsonParser(opts)
const parser = new DartJsonParser(opts, 'flutter')
const result = await parser.parse(filePath, fileContent)
expect(result).toMatchSnapshot()