Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Ferris committed Apr 1, 2020
2 parents f19067e + 9e605a8 commit 929a0cc
Show file tree
Hide file tree
Showing 44 changed files with 1,368 additions and 225 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"overrides": [
{
"files": [
"stories/*.{js,jsx}"
"stories/**/*.{js,jsx}"
],
"rules": {
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }]
Expand Down
2 changes: 1 addition & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ module.exports = {
'@storybook/addon-links/register',
'@storybook/addon-storysource/register'
],
stories: ['../stories/*.stories.js[x]'],
stories: ['../stories/**/*.stories.js[x]'],
};
6 changes: 6 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from 'react';
import { addDecorator } from "@storybook/react";
import { withA11y } from "@storybook/addon-a11y";

addDecorator(story => <div style={{ padding: '1rem' }}>{story()}</div>);
addDecorator(withA11y);
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ module.exports = {
// A map from regular expressions to module names that allow to stub out resources with a single module
moduleNameMapper: {
'\\.(css|less|scss)$': '<rootDir>/spec/__mocks__/styleMock.js',
'^src/([^\\.]*)$': "<rootDir>/src/$1",
},

// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
Expand Down
2 changes: 1 addition & 1 deletion spec/Flash/Flash.test.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { create } from 'react-test-renderer';

import Flash from '../../src/Flash/Flash';
import { Flash } from 'src/Flash';

describe('Flash', () => {
test('no header classes', () => {
Expand Down
2 changes: 1 addition & 1 deletion spec/Flash/useFlash.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { renderHook, act } from '@testing-library/react-hooks';
import { MessageTypes, useFlash } from '../../src/Flash';
import { MessageTypes, useFlash } from 'src/Flash';

const GENERATED_UUID = '1234';

Expand Down
3 changes: 1 addition & 2 deletions spec/Flash/withFlash.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import React from 'react';
import { act } from '@testing-library/react-hooks';
import { create } from 'react-test-renderer';

import withFlash from '../../src/Flash/withFlash';
import { MessageTypes } from '../../src/Flash';
import { withFlash, MessageTypes } from 'src/Flash';

jest.mock('react-transition-group', () => (
{
Expand Down
Loading

0 comments on commit 929a0cc

Please sign in to comment.