Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
KLewin23 committed Feb 18, 2020
1 parent a0a997f commit 0436576
Show file tree
Hide file tree
Showing 22 changed files with 281 additions and 4,810 deletions.
51 changes: 22 additions & 29 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,35 +1,28 @@
{
"extends": ["standard", "standard-react"],
"env": {
"es6": true,
"jest": true
},
"plugins": ["react", "jest"],
"parserOptions": {
"sourceType": "module"
},
"rules": {
// Indent with 4 spaces
"indent": [2, "tab"],
"react/jsx-indent": [2, "tab"],
"react/jsx-indent-props": [2, "tab"],
"extends": ["standard", "standard-react"],
"env": {
"es6": true
},
"plugins": ["react"],
"parserOptions": {
"sourceType": "module"
},
"rules": {
// Indent with 4 spaces
"indent": [2, "tab"],
"react/jsx-indent": [2, "tab"],
"react/jsx-indent-props": [2, "tab"],

//allow tabs
"no-tabs": "off",
//allow tabs
"no-tabs": "off",

// don't force es6 functions to include space before paren
"space-before-function-paren": 0,
// don't force es6 functions to include space before paren
"space-before-function-paren": 0,

// allow specifying true explicitly for boolean props
"react/jsx-boolean-value": 0,
// allow specifying true explicitly for boolean props
"react/jsx-boolean-value": 0,

// disable warnings when using setState in componentDidUpdate
"react/no-did-update-set-state": "off",

"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/prefer-to-have-length": "warn",
"jest/valid-expect": "error"
}
// disable warnings when using setState in componentDidUpdate
"react/no-did-update-set-state": "off"
}
}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
coverage/**/*
node_modules/**/*
.expo/*
npm-debug.*
Expand Down
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

13 changes: 0 additions & 13 deletions README.md

This file was deleted.

36 changes: 24 additions & 12 deletions __tests__/App-test.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
import React from 'react'
import renderer from 'react-test-renderer'
import App from '../App'
import React from 'react';
import NavigationTestUtils from 'react-navigation/NavigationTestUtils';
import renderer from 'react-test-renderer';

import Main from '../src/Main';

jest.mock('expo', () => ({
AppLoading: 'AppLoading'
}))
AppLoading: 'AppLoading',
}));

jest.mock('../navigation/AppNavigator', () => 'AppNavigator');

describe('Main', () => {
it('renders the loading screen', () => {
expect(renderer.create(<App />).toJSON()).toMatchSnapshot()
})
jest.useFakeTimers();

beforeEach(() => {
NavigationTestUtils.resetInternalState();
});

it(`renders the loading screen`, () => {
const tree = renderer.create(<Main />).toJSON();
expect(tree).toMatchSnapshot();
});

it('renders the root without loading screen', () => {
expect(renderer.create(<App skipLoadingScreen />).toJSON()).toMatchSnapshot()
})
})
it(`renders the root without loading screen`, () => {
const tree = renderer.create(<Main skipLoadingScreen />).toJSON();
expect(tree).toMatchSnapshot();
});
});
Loading

0 comments on commit 0436576

Please sign in to comment.