Commit 9b2b4326 authored by Julien Enselme's avatar Julien Enselme

fixup! chore(test): switch from karma to jest

parent 53647ba0
Pipeline #75264616 canceled with stages
in 5 minutes and 20 seconds
......@@ -23,12 +23,12 @@
<div id="counter-countainer">
<canvas ref="counterCanvas"
if.bind="!specialActionInProgress"
class="centered-block ${displayCounter ? '' : 'hidden'}"
class="counter centered-block ${displayCounter ? '' : 'hidden'}"
width="300"
height="300"></canvas>
<canvas ref="specialActionCounterCanvas"
if.bind="specialActionInProgress"
class="centered-block ${displayCounter ? '' : 'hidden'}"
class="counter centered-block ${displayCounter ? '' : 'hidden'}"
width="300"
height="300"></canvas>
</div>
......
......@@ -2,8 +2,7 @@
aot-counter {
#counter,
#counter-special-action {
.counter {
max-height: $play-secondary-height - 3vh;
max-width: 100%;
opacity: 0.8;
......
......@@ -80,8 +80,44 @@
"root": "app"
},
"testFramework": {
"id": "jasmine",
"displayName": "Jasmine"
"id": "jest",
"displayName": "Jest",
"config": {
"moduleNameMapper": {
"^aurelia-binding$": "<rootDir>/node_modules/aurelia-binding"
},
"modulePaths": [
"<rootDir>/app",
"<rootDir>/node_modules"
],
"moduleFileExtensions": [
"js",
"json"
],
"transform": {
"^.+\\.(css|less|sass|scss|styl|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "jest-transform-stub",
"^.+\\.js$": "babel-jest"
},
"testRegex": "\\.spec\\.js$",
"setupFiles": [
"<rootDir>/test/jest-pretest.js",
"jest-localstorage-mock"
],
"testEnvironment": "node",
"collectCoverageFrom": [
"app/**/*.js",
"!**/*.spec.js",
"!**/node_modules/**",
"!**/test/**"
],
"coverageDirectory": "<rootDir>/test/coverage-jest",
"coverageReporters": [
"json",
"lcov",
"text",
"html"
]
}
},
"assets": {
"manifest": {
......
import jest from 'jest-cli';
import path from 'path';
import packageJson from '../../package.json';
import project from '../aurelia.json';
import {CLIOptions} from 'aurelia-cli';
export default (cb) => {
let options = packageJson.jest;
let options = project.testFramework.config;
Object.assign(options, {
collectCoverage: CLIOptions.hasFlag('coverage'),
......@@ -19,12 +19,10 @@ export default (cb) => {
process.env.BABEL_TARGET = 'node';
jest.runCLI(options, [path.resolve(__dirname, '../../')]).then(({results}) => {
console.log('nasuinrstaeinrts', results.numFailedTests, results.numFailedTestSuites);
if (results.numFailedTests || results.numFailedTestSuites) {
cb('Tests Failed');
} else {
console.log('yanuiseanurietnrauiet');
cb();
cb(null);
}
});
};
......@@ -99,42 +99,6 @@
"engines": {
"node": ">=10.14.0"
},
"jest": {
"moduleNameMapper": {
"^aurelia-binding$": "<rootDir>/node_modules/aurelia-binding"
},
"modulePaths": [
"<rootDir>/app",
"<rootDir>/node_modules"
],
"moduleFileExtensions": [
"js",
"json"
],
"transform": {
"^.+\\.(css|less|sass|scss|styl|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "jest-transform-stub",
"^.+\\.js$": "babel-jest"
},
"testRegex": "\\.spec\\.js$",
"setupFiles": [
"<rootDir>/test/jest-pretest.js",
"jest-localstorage-mock"
],
"testEnvironment": "node",
"collectCoverageFrom": [
"app/**/*.js",
"!**/*.spec.js",
"!**/node_modules/**",
"!**/test/**"
],
"coverageDirectory": "<rootDir>/test/coverage-jest",
"coverageReporters": [
"json",
"lcov",
"text",
"html"
]
},
"keywords": [
"game",
"board",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment