Add test to the MapParser class in OTA_analyzer.

Add unit test to the MapParser class in map_parser.js. Please refer to
this CL for the original class definition:

https://android-review.googlesource.com/c/platform/development/+/1760909

Test: npm run test:unit
Change-Id: I2d640e9c5e27c0a012e32b4be09348034b67b235
This commit is contained in:
lishutong
2021-08-18 16:03:18 +00:00
parent a4648dfcba
commit fce8266b7e
3 changed files with 76 additions and 1 deletions

View File

@@ -1,6 +1,14 @@
const defaults = require('jest-config')
module.exports = {
preset: '@vue/cli-plugin-unit-jest',
transform: {
'^.+\\.vue$': 'vue-jest'
},
globals: {
...defaults.globals,
crypto: require('crypto'),
TextEncoder: require('util').TextEncoder,
TextDecoder: require('util').TextDecoder,
}
}
}