Skip to content

Commit 929a0cc

Browse files
author
Dave Ferris
committed
2 parents f19067e + 9e605a8 commit 929a0cc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1368
-225
lines changed

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"overrides": [
44
{
55
"files": [
6-
"stories/*.{js,jsx}"
6+
"stories/**/*.{js,jsx}"
77
],
88
"rules": {
99
"import/no-extraneous-dependencies": ["error", { "devDependencies": true }]

.storybook/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ module.exports = {
77
'@storybook/addon-links/register',
88
'@storybook/addon-storysource/register'
99
],
10-
stories: ['../stories/*.stories.js[x]'],
10+
stories: ['../stories/**/*.stories.js[x]'],
1111
};

.storybook/preview.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import React from 'react';
2+
import { addDecorator } from "@storybook/react";
3+
import { withA11y } from "@storybook/addon-a11y";
4+
5+
addDecorator(story => <div style={{ padding: '1rem' }}>{story()}</div>);
6+
addDecorator(withA11y);

jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ module.exports = {
7878
// A map from regular expressions to module names that allow to stub out resources with a single module
7979
moduleNameMapper: {
8080
'\\.(css|less|scss)$': '<rootDir>/spec/__mocks__/styleMock.js',
81+
'^src/([^\\.]*)$': "<rootDir>/src/$1",
8182
},
8283

8384
// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader

spec/Flash/Flash.test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { create } from 'react-test-renderer';
33

4-
import Flash from '../../src/Flash/Flash';
4+
import { Flash } from 'src/Flash';
55

66
describe('Flash', () => {
77
test('no header classes', () => {

spec/Flash/useFlash.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { renderHook, act } from '@testing-library/react-hooks';
2-
import { MessageTypes, useFlash } from '../../src/Flash';
2+
import { MessageTypes, useFlash } from 'src/Flash';
33

44
const GENERATED_UUID = '1234';
55

spec/Flash/withFlash.test.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import React from 'react';
22
import { act } from '@testing-library/react-hooks';
33
import { create } from 'react-test-renderer';
44

5-
import withFlash from '../../src/Flash/withFlash';
6-
import { MessageTypes } from '../../src/Flash';
5+
import { withFlash, MessageTypes } from 'src/Flash';
76

87
jest.mock('react-transition-group', () => (
98
{

0 commit comments

Comments
 (0)