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

Commit

Permalink
Merge pull request #26 from andymikulski/4-fix-ci-tests
Browse files Browse the repository at this point in the history
#4- Fix tests for CI
  • Loading branch information
andymikulski committed Mar 8, 2018
2 parents 5a79e78 + 0a28769 commit 63a272e
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[libs]

[options]
module.name_mapper.extension='less' -> '<PROJECT_ROOT>/FlowStubModule.js'
module.name_mapper.extension='less' -> '<PROJECT_ROOT>/StubModule.js'
module.name_mapper='^console\/\(.*\)$' -> '<PROJECT_ROOT>/console/\1'
emoji=true

1 change: 0 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"parser": "flow",
"loglevel": "warn",
"singleQuote": true,
"trailingComma": "all",
}
6 changes: 0 additions & 6 deletions FlowStubModule.js

This file was deleted.

6 changes: 6 additions & 0 deletions StubModule.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* This is a stub file used by the Flow checker and Jest for ignored filetypes.
* Essentially, this tells them that the module does not export anything, so
* there is nothing for it to type check.
*/
module.exports = {};
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,10 @@
"stylelint": "^9.1.1",
"stylelint-config-standard": "^18.1.0",
"stylelint-order": "^0.8.1"
},
"jest": {
"moduleNameMapper": {
".*\\.less$": "<rootDir>/StubModule.js"
}
}
}
2 changes: 1 addition & 1 deletion src/console/App.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import App from './index';

it('renders without crashing', () => {
const div = document.createElement('div');
Expand Down
8 changes: 4 additions & 4 deletions src/console/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import React, { Component } from 'react';
import 'console/App.less';

import LoginPage from './LoginPage';
import { BrowserRouter, NavLink, Link, withRouter } from 'react-router-dom';
import { BrowserRouter, NavLink, Link } from 'react-router-dom';
import { Route, Redirect } from 'react-router';

import { Alert, Button, Layout, Menu } from 'antd';
const { Header, Footer, Content } = Layout;
import { Alert, Layout } from 'antd';
const { Header, Content } = Layout;

const Homepage = props => (
<div>
Expand Down Expand Up @@ -73,7 +73,7 @@ class App extends Component<AppProps, AppState> {
/>
)}
</Header>
<Content class="app-content">
<Content className="app-content">
{/* Homepage */}
<Route
exact
Expand Down

0 comments on commit 63a272e

Please sign in to comment.