Skip to content

Commit

Permalink
MOVE tests next to code && ADD .bettercodehub.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Apr 16, 2017
1 parent 9e53b87 commit f74c2a5
Show file tree
Hide file tree
Showing 22 changed files with 38 additions and 24 deletions.
14 changes: 14 additions & 0 deletions .bettercodehub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
component_depth: 2
languages:
- javascript

- name: javascript
production:
exclude:
- .*\.test\.js
- .*\/__test__\/.*\.js
- .*\/__mock__\/.*\.js
test:
include:
- .*\.test\.js
- .*\/__test__\/.*\.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ClientAPI from '../client_api';
import ClientAPI from './client_api';

class StoryStore {
constructor() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import mock from 'mock-fs';
import { getHeadHtml } from '../utils';
import { getHeadHtml } from './utils';

const HEAD_HTML_CONTENTS = '<script>console.log("custom script!");</script>';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import actions from '../api';
import actions from './api';

class MockClientStore {
update(cb) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import initApi from '../init_api';
import initApi from './init_api';

describe('manager.api.config.initApi', () => {
it('should expose correct API methods', done => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import actions from '../shortcuts';
import actions from './shortcuts';

class MockClientStore {
update(cb) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import actions from '../ui';
import actions from './ui';

describe('manager.ui.actions.ui', () => {
describe('setStoryFilter', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { shallow } from 'enzyme';
import DownPanel from '../index';
import DownPanel from './index';

describe('manager.ui.components.down_panel.index', () => {
test('should render only the selected panel with display set other than "none"', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { shallow } from 'enzyme';
import Layout from '../index.js';
import Layout from './index.js';

describe('manager.ui.components.layout.index', () => {
describe('with default options', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { shallow } from 'enzyme';
import Header from '../header.js';
import Header from './header.js';

describe('manager.ui.components.left_panel.header', () => {
test('should fire openShortcutsHelp when clicked on shortcut button', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import { shallow } from 'enzyme';
import LeftPanel from '../index';
import Header from '../header';
import TextFilter from '../text_filter';
import Stories from '../stories';
import LeftPanel from './index';
import Header from './header';
import TextFilter from './text_filter';
import Stories from './stories';

describe('manager.ui.components.left_panel.index', () => {
test('should render Header and TextFilter by default', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { shallow } from 'enzyme';
import React from 'react';
import Stories from '../stories';
import Stories from './stories';

describe('manager.ui.components.left_panel.stories', () => {
describe('render', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { shallow } from 'enzyme';
import React from 'react';
import TextFilter from '../text_filter';
import TextFilter from './text_filter';

describe('manager.ui.components.left_panel.test_filter', () => {
describe('render', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import handleKeyEvents from '../handle_keyevents';
import handleKeyEvents from './handle_keyevents';
import keycode from 'keycode';

describe('manager.ui.config.handle_keyevents', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { changeUrl, handleInitialUrl, config } from '../handle_routing';
import { changeUrl, handleInitialUrl, config } from './handle_routing';

describe('manager.ui.config.handle_routing', () => {
describe('changeUrl', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import initPanels from '../init_panels';
import initPanels from './init_panels';

describe('manager.ui.config.init_panels', () => {
test('should call the selectDownPanel with first panel name', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { mapper } from '../down_panel';
import { mapper } from './down_panel';

describe('manager.ui.containers.down_panel', () => {
describe('mapper', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { mapper } from '../layout';
import { mapper } from './layout';

describe('manager.ui.containers.layout', () => {
describe('mapper', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { mapper } from '../left_panel';
import { mapper } from './left_panel';

describe('manager.ui.containers.left_panel', () => {
describe('mapper', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { mapper } from '../shortcuts_help';
import { mapper } from './shortcuts_help';

describe('manager.ui.containers.shortcuts_help', () => {
describe('mapper', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { storyFilter } from '../filters';
import { storyFilter } from './filters';

describe('manager.ui.libs.filters', () => {
describe('storyFilter', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import genPoddaLoader from '../gen_podda_loader';
import genPoddaLoader from './gen_podda_loader';
import Podda from 'podda';

describe('manager.ui.libs.gen_podda_loader', () => {
Expand Down

0 comments on commit f74c2a5

Please sign in to comment.