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

Commit

Permalink
Add failing test case
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinGrandon committed Sep 26, 2018
1 parent a7275f6 commit d094a72
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
6 changes: 4 additions & 2 deletions test/cli/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ test('`fusion test` dynamic imports', async t => {
t.end();
});

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

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

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

t.end();
});
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* istanbul ignore file */
// @generated
// @flow
// This file should not be present in coverage due to the istanbul ignore file annotation.
// The `import *` syntax is required for this test case.
import * as FusionCore from 'fusion-core';

export type Something = FusionCore.Context;
3 changes: 2 additions & 1 deletion test/fixtures/test-jest-app/src/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @flow
import {foo} from './foo.js';
import noop from './istanbul-ignore-coverage';
import noop from './istanbul-ignore-coverage.js';
import type {Something} from './istanbul-ignore-coverage.flow.js';

export default function() {
noop();
Expand Down

0 comments on commit d094a72

Please sign in to comment.