File tree 6 files changed +19
-19
lines changed
6 files changed +19
-19
lines changed Original file line number Diff line number Diff line change 1
1
/**
2
2
* @license
3
- * Copyright 2017 Google Inc.
3
+ * Copyright 2017 Google LLC
4
4
*
5
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
6
* you may not use this file except in compliance with the License.
@@ -57,7 +57,10 @@ const config = {
57
57
// preprocess matching files before serving them to the browser
58
58
// available preprocessors:
59
59
// https://npmjs.org/browse/keyword/karma-preprocessor
60
- preprocessors : { 'test/**/*.ts' : [ 'webpack' , 'sourcemap' ] } ,
60
+ preprocessors : {
61
+ 'test/**/*.ts' : [ 'webpack' , 'sourcemap' ] ,
62
+ 'src/**/*.test.ts' : [ 'webpack' , 'sourcemap' ]
63
+ } ,
61
64
62
65
mime : { 'text/x-typescript' : [ 'ts' , 'tsx' ] } ,
63
66
Original file line number Diff line number Diff line change 1
1
/**
2
2
* @license
3
- * Copyright 2019 Google Inc.
3
+ * Copyright 2019 Google LLC
4
4
*
5
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
6
* you may not use this file except in compliance with the License.
@@ -23,7 +23,6 @@ module.exports = function(config) {
23
23
config . set ( {
24
24
...karmaBase ,
25
25
files,
26
- preprocessors : { '**/*.ts' : [ 'webpack' , 'sourcemap' ] } ,
27
26
frameworks : [ 'mocha' ]
28
27
} ) ;
29
28
} ;
Original file line number Diff line number Diff line change 1
1
/**
2
2
* @license
3
- * Copyright 2017 Google Inc.
3
+ * Copyright 2017 Google LLC
4
4
*
5
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
6
* you may not use this file except in compliance with the License.
15
15
* limitations under the License.
16
16
*/
17
17
18
- const karma = require ( 'karma' ) ;
19
- const path = require ( 'path' ) ;
20
18
const karmaBase = require ( '../../config/karma.base' ) ;
21
19
22
- const FILES = [ `src/**/*.test.ts` ] ;
20
+ const files = [ `src/**/*.test.ts` ] ;
23
21
24
22
module . exports = function ( config ) {
25
23
const karmaConfig = {
26
24
...karmaBase ,
27
- files : FILES ,
28
- preprocessors : { 'src/**/*.test.ts' : [ 'webpack' , 'sourcemap' ] } ,
25
+ files,
29
26
frameworks : [ 'mocha' ]
30
27
} ;
31
28
32
29
config . set ( karmaConfig ) ;
33
30
} ;
34
31
35
- module . exports . files = FILES ;
32
+ module . exports . files = files ;
Original file line number Diff line number Diff line change 1
1
/**
2
2
* @license
3
- * Copyright 2019 Google Inc.
3
+ * Copyright 2019 Google LLC
4
4
*
5
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
6
* you may not use this file except in compliance with the License.
17
17
18
18
const karmaBase = require ( '../../config/karma.base' ) ;
19
19
20
- const files = [ `test /**/*` ] ;
20
+ const files = [ `src /**/*.test.ts ` ] ;
21
21
22
22
module . exports = function ( config ) {
23
- const karmaConfig = Object . assign ( { } , karmaBase , {
23
+ const karmaConfig = {
24
+ ...karmaBase ,
24
25
// files to load into karma
25
- files : files ,
26
+ files,
26
27
// frameworks to use
27
28
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
28
29
frameworks : [ 'mocha' ]
29
- } ) ;
30
+ } ;
30
31
31
32
config . set ( karmaConfig ) ;
32
33
} ;
Original file line number Diff line number Diff line change 19
19
"dev" : " rollup -c -w" ,
20
20
"test" : " yarn type-check && run-p lint test:browser test:node" ,
21
21
"test:browser" : " karma start --single-run" ,
22
- "test:node" : " TS_NODE_COMPILER_OPTIONS='{\" module\" :\" commonjs\" }' nyc --reporter lcovonly -- mocha test /**/*.test.* --opts ../../config/mocha.node.opts" ,
22
+ "test:node" : " TS_NODE_COMPILER_OPTIONS='{\" module\" :\" commonjs\" }' nyc --reporter lcovonly -- mocha src /**/*.test.* --opts ../../config/mocha.node.opts" ,
23
23
"type-check" : " tsc -p . --noEmit" ,
24
24
"prepare" : " yarn build"
25
25
},
Original file line number Diff line number Diff line change 1
1
/**
2
2
* @license
3
- * Copyright 2017 Google Inc.
3
+ * Copyright 2017 Google LLC
4
4
*
5
5
* Licensed under the Apache License, Version 2.0 (the "License");
6
6
* you may not use this file except in compliance with the License.
16
16
*/
17
17
18
18
import { expect } from 'chai' ;
19
- import { testFxn } from '../src ' ;
19
+ import { testFxn } from './index ' ;
20
20
21
21
describe ( 'Simple test' , ( ) => {
22
22
it ( 'Should skip this test' ) ;
You can’t perform that action at this time.
0 commit comments