Open 565784135 opened 5 years ago
karma.conf.js
... files: [ { pattern: 'js/add.js', type: 'module' }, { pattern: 'test/add.spec.js', type: 'module' } ], preprocessors: { './js/add.js': ['coverage'] }, ...
add.js
let add = n => ++n; export { add };
add.spec.js
import { add } from '../js/add.js'; describe('test', function() { it('add', function() { expect(add(2)).toBe(3); }); });
文件以 Githubissues.
karma.conf.js
add.js
add.spec.js
文件以 Githubissues.