Skip to content

Update @callstack/eslint-config to the latest version 🚀 #134

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

Merged
merged 3 commits into from
Mar 16, 2019
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
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "@callstack",
"rules": {
"flowtype/no-weak-types": 0,
"react/no-multi-comp": 0
"react-native/no-raw-text": 0,
"no-console": 1
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
"@babel/cli": "^7.1.2",
"@babel/core": "^7.1.2",
"@babel/runtime": "^7.1.2",
"@callstack/eslint-config": "^3.0.0",
"@callstack/eslint-config": "^4.0.1",
"@types/react": "^16.7.11",
"@types/react-test-renderer": "^16.0.3",
"babel-jest": "^24.1.0",
"chalk": "^2.4.1",
"conventional-changelog-cli": "^2.0.11",
"dedent": "^0.7.0",
"eslint": "^5.14.1",
"eslint": "^5.15.2",
"flow-bin": "^0.94.0",
"flow-copy-source": "^2.0.2",
"jest": "^24.1.0",
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/debug.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ test('debug', () => {

debug(component, 'test message');

expect(console.log).toBeCalledWith('test message\n\n', output);
expect(console.log).toHaveBeenCalledWith('test message\n\n', output);
});

test('debug.shallow', () => {
Expand All @@ -66,7 +66,7 @@ test('debug.deep', () => {

debug.deep(component, 'test message');

expect(console.log).toBeCalledWith('test message\n\n', output);
expect(console.log).toHaveBeenCalledWith('test message\n\n', output);
});

test('debug.deep async test', async () => {
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/fireEvent.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('fireEvent', () => {
test('should throw an Error when event handler was not found', () => {
const { getByTestId } = render(<WithoutEventComponent />);

expect(() => fireEvent(getByTestId('text'), 'press')).toThrowError(
expect(() => fireEvent(getByTestId('text'), 'press')).toThrow(
'No handler function found for event: press'
);
});
Expand Down Expand Up @@ -79,7 +79,7 @@ describe('fireEvent', () => {
</TouchableOpacity>
);

expect(() => fireEvent.press(getByTestId('test'))).toThrowError();
expect(() => fireEvent.press(getByTestId('test'))).toThrow();
expect(onPressMock).not.toHaveBeenCalled();
});
});
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/waitForElement.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Banana extends React.Component<*, *> {
<View>
{this.props.fresh && <Text testID="fresh">Fresh</Text>}
<TouchableOpacity onPress={this.changeFresh}>
Change freshness!
<Text>Change freshness!</Text>
</TouchableOpacity>
</View>
);
Expand Down Expand Up @@ -69,7 +69,7 @@ test('waits for element with custom interval', async () => {
// suppress
}

expect(mockFn).toBeCalledTimes(3);
expect(mockFn).toHaveBeenCalledTimes(3);
});

test('works with fake timers', async () => {
Expand All @@ -86,7 +86,7 @@ test('works with fake timers', async () => {
}
jest.runTimersToTime(400);

expect(mockFn).toBeCalledTimes(3);
expect(mockFn).toHaveBeenCalledTimes(3);

jest.useRealTimers();
});
Loading