Explorar el Código

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

Rajiv Shah hace 5 años
padre
commit
24a339ae75

+ 7 - 3
cli/tauri.js/jest.config.js

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

+ 1 - 1
cli/tauri.js/test/jest/__tests__/tauri.spec.js

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

+ 2 - 2
cli/tauri.js/test/jest/__tests__/tauricon.spec.js

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