Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
test: mock read-pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
marionebl authored and tilmx committed Mar 21, 2019
1 parent d7bc89b commit 76406cc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { getDefaultCode, getCommentValue, analyzeSlots } from './slot-analzyer';
import * as TypescriptUtils from '../typescript-utils';
import * as TestUtils from '../test-utils';
import { Project } from 'ts-simple-ast';
import { exec } from 'child_process';

const fixtures = require('fixturez')(__dirname);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ import * as tsa from 'ts-simple-ast';
import { analyzeSlotDefault, getExportSpecifier } from './slot-default-analyzer';
import * as uuid from 'uuid';

interface TestContext {
project: tsa.Project;
pkgPath: string;
path: string;
}

jest.mock('find-pkg', () => ({
sync: (input: string) => '/package.json'
}));

jest.mock('read-pkg', () => ({
sync: () => ({ name: 'name ' })
}));

jest.mock('../react-utils/find-react-component-type', () => ({
findReactComponentType: () => true
}));
Expand Down

0 comments on commit 76406cc

Please sign in to comment.