tauri/cli/tauri.js/jest.config.js
Lucas Fernandes Nogueira 37afc5b0dc
fix(tauri.js) determine app path correctly (#493)
* fix(tauri.js) determine app path correctly

* fix(lint): replace backtick with single-quote

* fix(tests) mock app-paths

* fix(tauri.js) linting

* fix(test) use local tauri on empty fixture

* fix(tauri.js) linting

* fix(workflows) use local tauri-bundler test-tauri-js-cli

* fix(workflows) wrong cargo install command

* fix(tauri) comment webview-spawning test

Co-authored-by: nothingismagick <denjell@sfosc.org>
2020-03-09 21:27:54 -03:00

49 lines
1.3 KiB
JavaScript

module.exports = {
globals: {
__DEV__: true
},
setupFilesAfterEnv: ['<rootDir>/test/jest/jest.setup.js'],
// noStackTrace: true,
// bail: true,
// cache: false,
// verbose: true,
// watch: true,
collectCoverage: true,
coverageDirectory: '<rootDir>/test/jest/coverage',
collectCoverageFrom: [
'<rootDir>/bin/**/*.js',
'<rootDir>/helpers/**/*.js',
'<rootDir>/api/**/*.js'
],
coverageReporters: ['json-summary', 'text', 'lcov'],
coverageThreshold: {
global: {
// branches: 50,
// functions: 50,
// lines: 50,
// statements: 50
}
},
testMatch: [
'<rootDir>/test/jest/__tests__/**/*.spec.js',
'<rootDir>/test/jest/__tests__/**/*.test.js'
],
testPathIgnorePatterns: [
'(build|dev).spec.js'
],
moduleFileExtensions: ['ts', 'js', 'json'],
moduleNameMapper: {
'^~/(.*)$': '<rootDir>/$1',
'^bin/(.*)$': '<rootDir>/bin/$1',
'^helpers/(.*)$': '<rootDir>/src/helpers/$1',
'^api/(.*)$': '<rootDir>/src/api/$1',
'^templates/(.*)$': '<rootDir>/src/templates/$1',
'^test/(.*)$': '<rootDir>/test/$1',
'../../package.json': '<rootDir>/package.json'
},
"transform": {
"templates[\\\\/](tauri|mutation-observer)\.js": "./test/jest/raw-loader-transformer.js",
"\\.(js|ts)$": "babel-jest"
}
}