Skip to content

Commit 8e7d8d2

Browse files
committed
added karma test script
1 parent 62ab53b commit 8e7d8d2

9 files changed

+4506
-1111
lines changed

.editorconfig

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
end_of_line = lf
11+
12+
[*.md]
13+
max_line_length = off
14+
trim_trailing_whitespace = false
15+
16+
[*.cs]
17+
indent_size = 4

bin/react-unity-scripts.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ const spawn = require('react-dev-utils/crossSpawn');
1919
const args = process.argv.slice(2);
2020

2121
const scriptIndex = args.findIndex(
22-
x => x === 'build' || x === 'eject' || x === 'start' || x === 'test'
22+
x => x === 'build' || x === 'eject' || x === 'start' || x === 'test' || x === 'test-jest'
2323
);
2424
const script = scriptIndex === -1 ? args[0] : args[scriptIndex];
2525
const nodeArgs = scriptIndex > 0 ? args.slice(0, scriptIndex) : [];
2626

27-
if (['build', 'eject', 'start', 'test'].includes(script)) {
27+
if (['build', 'eject', 'start', 'test', 'test-jest'].includes(script)) {
2828
const result = spawn.sync(
2929
process.execPath,
3030
nodeArgs

config/webpack.config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ const sassModuleRegex = /\.module\.(scss|sass)$/;
5858
// This is the production and development configuration.
5959
// It is focused on developer experience, fast rebuilds, and a minimal bundle.
6060
module.exports = function (webpackEnv) {
61-
const isEnvDevelopment = webpackEnv === 'development';
61+
const isEnvTest = webpackEnv === 'test';
62+
const isEnvDevelopment = isEnvTest || webpackEnv === 'development';
6263
const isEnvProduction = webpackEnv === 'production';
6364

6465
// Variable used for enabling profiling in Production

0 commit comments

Comments
 (0)