Skip to content
This repository was archived by the owner on May 17, 2019. It is now read-only.

Commit d094a72

Browse files
committed
Add failing test case
1 parent a7275f6 commit d094a72

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

test/cli/test.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ test('`fusion test` dynamic imports', async t => {
213213
t.end();
214214
});
215215

216-
test('`fusion test` coverage', async t => {
216+
test.only('`fusion test` coverage', async t => {
217217
const dir = path.resolve(__dirname, '../fixtures/test-jest-app');
218218
const args = `test --dir=${dir} --configPath=../../../build/jest/jest-config.js --coverage --match=passes`;
219219

@@ -227,8 +227,10 @@ test('`fusion test` coverage', async t => {
227227
// This file is outside of src and should not be included in coverage
228228
t.ok(!response.stdout.includes('should-not-count-for-coverage.js'));
229229

230-
// This file instruments the istanbul ignore annotation and should not be included in coverage
230+
// These files instruments the istanbul ignore annotation and should not be included in coverage
231+
console.log('response.stdout, response.stdout', response.stdout);
231232
t.ok(!response.stdout.includes('istanbul-ignore-coverage.js'));
233+
t.ok(!response.stdout.includes('istanbul-ignore-coverage.flow.js'));
232234

233235
t.end();
234236
});
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/* istanbul ignore file */
2+
// @generated
3+
// @flow
4+
// This file should not be present in coverage due to the istanbul ignore file annotation.
5+
// The `import *` syntax is required for this test case.
6+
import * as FusionCore from 'fusion-core';
7+
8+
export type Something = FusionCore.Context;

test/fixtures/test-jest-app/src/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// @flow
22
import {foo} from './foo.js';
3-
import noop from './istanbul-ignore-coverage';
3+
import noop from './istanbul-ignore-coverage.js';
4+
import type {Something} from './istanbul-ignore-coverage.flow.js';
45

56
export default function() {
67
noop();

0 commit comments

Comments
 (0)