Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wallaby #5917

Merged
merged 4 commits into from
Feb 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/src/commands/OptionsProcessor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ import { mock, when, anyString, instance, anyNumber, verify } from 'ts-mockito';
import { ColorService } from '../adapters/ColorService';
import { AssetService } from '../adapters/AssetResolver';

jest.mock('lodash/uniqueId', () => {
return (prefix: string) => `${prefix}1`
})

describe('navigation options', () => {
let uut: OptionsProcessor;
const mockedStore = mock(Store) as Store;
Expand Down Expand Up @@ -86,7 +90,6 @@ describe('navigation options', () => {
const options = { topBar: { title: { component: { name: 'a' } } } };

uut.processOptions(options);

expect(options).toEqual({
topBar: { title: { component: { name: 'a', componentId: 'CustomComponent1' } } },
});
Expand Down
2 changes: 1 addition & 1 deletion lib/src/components/ComponentWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import { ComponentProvider } from 'react-native';
import merge from 'lodash/merge'
import { polyfill } from 'react-lifecycles-compat';
import hoistNonReactStatics = require('hoist-non-react-statics');
import hoistNonReactStatics from 'hoist-non-react-statics';

import { Store } from './Store';
import { ComponentEventsObserver } from '../events/ComponentEventsObserver';
Expand Down
17 changes: 10 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,20 @@
},
"roots": [
"<rootDir>/node_modules/",
"<rootDir>/lib/dist/",
"<rootDir>/lib/src/",
"<rootDir>/integration/"
],
"collectCoverageFrom": [
"lib/dist/**/*.js",
"!lib/src/**/*.js",
"integration/**/*.js",
"!lib/dist/index.js",
"!lib/dist/Navigation.js",
"!lib/dist/adapters/**/*",
"!lib/dist/interfaces/**/*",
"!lib/dist/**/*.test.*",
"lib/src/**/*.ts",
"lib/src/**/*.tsx",
"!lib/src/index.ts",
"!lib/src/types.ts",
"!lib/src/Navigation.ts",
"!lib/src/adapters/**/*",
"!lib/src/interfaces/**/*",
"!lib/src/**/*.test.*",
"!integration/**/*.test.*",
"!integration/*.test.*"
],
Expand Down
28 changes: 0 additions & 28 deletions wallaby.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,6 @@ module.exports = function (wallaby) {
},

testFramework: 'jest',

files: [
'package.json',
'lib/src/**/*.js',
'lib/src/**/*.ts',
'lib/src/**/*.tsx',
'!lib/src/**/*.test.tsx',
'!lib/src/**/*.test.js',
'!lib/src/**/*.test.ts',
'integration/**/*.js',
'!integration/**/*.test.js'
],

tests: [
'lib/src/**/*.test.js',
'lib/src/**/*.test.ts',
'lib/src/**/*.test.tsx',
'integration/**/*.test.js'
],

compilers: {
'**/*.js': wallaby.compilers.babel(babelOptions),
'**/*.ts?(x)': wallaby.compilers.typeScript({
module: 'commonjs',
jsx: 'React'
})
},

setup: (w) => {
w.testFramework.configure(require('./package.json').jest);
}
Expand Down