fix(test): fix Jest tests (#77)

This commit is contained in:
Rajiv Shah 2019-11-28 02:41:47 -05:00 committed by nothingismagick
parent d1cd6d102e
commit 24a339ae75
3 changed files with 10 additions and 6 deletions

View File

@ -11,7 +11,8 @@ module.exports = {
collectCoverage: true, collectCoverage: true,
coverageDirectory: '<rootDir>/test/jest/coverage', coverageDirectory: '<rootDir>/test/jest/coverage',
collectCoverageFrom: [ collectCoverageFrom: [
'<rootDir>/mode/**/*.js' '<rootDir>/bin/**/*.js',
'<rootDir>/helpers/**/*.js'
], ],
coverageReporters: ['json-summary', 'text', 'lcov'], coverageReporters: ['json-summary', 'text', 'lcov'],
coverageThreshold: { coverageThreshold: {
@ -29,8 +30,11 @@ module.exports = {
moduleFileExtensions: ['js', 'json'], moduleFileExtensions: ['js', 'json'],
moduleNameMapper: { moduleNameMapper: {
'^~/(.*)$': '<rootDir>/$1', '^~/(.*)$': '<rootDir>/$1',
'^mode/(.*)$': '<rootDir>/mode/$1', '^bin/(.*)$': '<rootDir>/bin/$1',
'^test/(.*)$': '<rootDir>/test/$1' '^helpers/(.*)$': '<rootDir>/helpers/$1',
'^templates/(.*)$': '<rootDir>/templates/$1',
'^test/(.*)$': '<rootDir>/test/$1',
'../../package.json': '<rootDir>/package.json'
}, },
transform: {} transform: {}
} }

View File

@ -1,4 +1,4 @@
const { tauri } = require('mode/bin/tauri') const { tauri } = require('bin/tauri')
describe('[CLI] tauri.js', () => { describe('[CLI] tauri.js', () => {
it('displays a help message', async () => { it('displays a help message', async () => {

View File

@ -1,5 +1,5 @@
const { tauricon } = require('mode/helpers/tauricon') const { tauricon } = require('helpers/tauricon')
const { tauri } = require('mode/bin/tauri') const { tauri } = require('bin/tauri')
describe('[CLI] tauri-icon internals', () => { describe('[CLI] tauri-icon internals', () => {
it('tells you the version', () => { it('tells you the version', () => {