Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"@babel/core": "7.2.0",
"@babel/plugin-proposal-class-properties": "7.2.0",
"@babel/plugin-transform-object-assign": "7.2.0",
"@babel/polyfill": "7.0.0",
"@babel/preset-env": "7.2.0",
"@babel/preset-react": "7.0.0",
"@svgr/webpack": "4.1.0",
Expand Down
8 changes: 5 additions & 3 deletions packages/.template/src/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

import { matchExports } from '@zendeskgarden/react-testing';
import { getExports } from '@zendeskgarden/react-testing';
import * as rootIndex from './';

describe('Index', () => {
it('exports all components and utilities', () => {
return matchExports({ cwd: __dirname, keys: Object.keys(rootIndex).sort() });
it('exports all components and utilities', async () => {
const exports = await getExports({ cwd: __dirname });

expect(Object.keys(rootIndex).sort()).toEqual(exports);
});
});
8 changes: 5 additions & 3 deletions packages/autocomplete/src/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

import { matchExports } from '@zendeskgarden/react-testing';
import { getExports } from '@zendeskgarden/react-testing';
import * as rootIndex from './';

describe('Index', () => {
it('exports all components and utilities', () => {
return matchExports({ cwd: __dirname, keys: Object.keys(rootIndex).sort() });
it('exports all components and utilities', async () => {
const exports = await getExports({ cwd: __dirname });

expect(Object.keys(rootIndex).sort()).toEqual(exports);
});
});
8 changes: 5 additions & 3 deletions packages/avatars/src/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

import { matchExports } from '@zendeskgarden/react-testing';
import { getExports } from '@zendeskgarden/react-testing';
import * as rootIndex from './';

describe('Index', () => {
it('exports all components and utilities', () => {
return matchExports({ cwd: __dirname, keys: Object.keys(rootIndex).sort() });
it('exports all components and utilities', async () => {
const exports = await getExports({ cwd: __dirname });

expect(Object.keys(rootIndex).sort()).toEqual(exports);
});
});
8 changes: 5 additions & 3 deletions packages/breadcrumbs/src/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

import { matchExports } from '@zendeskgarden/react-testing';
import { getExports } from '@zendeskgarden/react-testing';
import * as rootIndex from './';

describe('Index', () => {
it('exports all components and utilities', () => {
return matchExports({ cwd: __dirname, keys: Object.keys(rootIndex).sort() });
it('exports all components and utilities', async () => {
const exports = await getExports({ cwd: __dirname });

expect(Object.keys(rootIndex).sort()).toEqual(exports);
});
});
8 changes: 5 additions & 3 deletions packages/buttons/src/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

import { matchExports } from '@zendeskgarden/react-testing';
import { getExports } from '@zendeskgarden/react-testing';
import * as rootIndex from './';

describe('Index', () => {
it('exports all components and utilities', () => {
return matchExports({ cwd: __dirname, keys: Object.keys(rootIndex).sort() });
it('exports all components and utilities', async () => {
const exports = await getExports({ cwd: __dirname });

expect(Object.keys(rootIndex).sort()).toEqual(exports);
});
});
8 changes: 5 additions & 3 deletions packages/checkboxes/src/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

import { matchExports } from '@zendeskgarden/react-testing';
import { getExports } from '@zendeskgarden/react-testing';
import * as rootIndex from './';

describe('Index', () => {
it('exports all components and utilities', () => {
return matchExports({ cwd: __dirname, keys: Object.keys(rootIndex).sort() });
it('exports all components and utilities', async () => {
const exports = await getExports({ cwd: __dirname });

expect(Object.keys(rootIndex).sort()).toEqual(exports);
});
});
8 changes: 5 additions & 3 deletions packages/chrome/src/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

import { matchExports } from '@zendeskgarden/react-testing';
import { getExports } from '@zendeskgarden/react-testing';
import * as rootIndex from './';

describe('Index', () => {
it('exports all components and utilities', () => {
return matchExports({ cwd: __dirname, keys: Object.keys(rootIndex).sort() });
it('exports all components and utilities', async () => {
const exports = await getExports({ cwd: __dirname });

expect(Object.keys(rootIndex).sort()).toEqual(exports);
});
});
8 changes: 5 additions & 3 deletions packages/grid/src/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

import { matchExports } from '@zendeskgarden/react-testing';
import { getExports } from '@zendeskgarden/react-testing';
import * as rootIndex from './';

describe('Index', () => {
it('exports all components and utilities', () => {
return matchExports({ cwd: __dirname, keys: Object.keys(rootIndex).sort() });
it('exports all components and utilities', async () => {
const exports = await getExports({ cwd: __dirname });

expect(Object.keys(rootIndex).sort()).toEqual(exports);
});
});
12 changes: 5 additions & 7 deletions packages/loaders/src/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

import { matchExports } from '@zendeskgarden/react-testing';
import { getExports } from '@zendeskgarden/react-testing';
import * as rootIndex from './';

describe('Index', () => {
it('exports all components and utilities', () => {
return matchExports({
globPath: '[A-Z]!(*.spec).js',
cwd: __dirname,
keys: Object.keys(rootIndex).sort()
});
it('exports all components and utilities', async () => {
const exports = await getExports({ cwd: __dirname, globPath: '[A-Z]!(*.spec).js' });

expect(Object.keys(rootIndex).sort()).toEqual(exports);
});
});
8 changes: 5 additions & 3 deletions packages/menus/src/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

import { matchExports } from '@zendeskgarden/react-testing';
import { getExports } from '@zendeskgarden/react-testing';
import * as rootIndex from './';

describe('Index', () => {
it('exports all components and utilities', () => {
return matchExports({ cwd: __dirname, keys: Object.keys(rootIndex).sort() });
it('exports all components and utilities', async () => {
const exports = await getExports({ cwd: __dirname });

expect(Object.keys(rootIndex).sort()).toEqual(exports);
});
});
8 changes: 5 additions & 3 deletions packages/modals/src/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

import { matchExports } from '@zendeskgarden/react-testing';
import { getExports } from '@zendeskgarden/react-testing';
import * as rootIndex from './';

describe('Index', () => {
it('exports all components and utilities', () => {
return matchExports({ cwd: __dirname, keys: Object.keys(rootIndex).sort() });
it('exports all components and utilities', async () => {
const exports = await getExports({ cwd: __dirname });

expect(Object.keys(rootIndex).sort()).toEqual(exports);
});
});
8 changes: 5 additions & 3 deletions packages/notifications/src/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

import { matchExports } from '@zendeskgarden/react-testing';
import { getExports } from '@zendeskgarden/react-testing';
import * as rootIndex from './';

describe('Index', () => {
it('exports all components and utilities', () => {
return matchExports({ cwd: __dirname, keys: Object.keys(rootIndex).sort() });
it('exports all components and utilities', async () => {
const exports = await getExports({ cwd: __dirname });

expect(Object.keys(rootIndex).sort()).toEqual(exports);
});
});
8 changes: 5 additions & 3 deletions packages/pagination/src/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

import { matchExports } from '@zendeskgarden/react-testing';
import { getExports } from '@zendeskgarden/react-testing';
import * as rootIndex from './';

describe('Index', () => {
it('exports all components and utilities', () => {
return matchExports({ cwd: __dirname, keys: Object.keys(rootIndex).sort() });
it('exports all components and utilities', async () => {
const exports = await getExports({ cwd: __dirname });

expect(Object.keys(rootIndex).sort()).toEqual(exports);
});
});
8 changes: 5 additions & 3 deletions packages/radios/src/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

import { matchExports } from '@zendeskgarden/react-testing';
import { getExports } from '@zendeskgarden/react-testing';
import * as rootIndex from './';

describe('Index', () => {
it('exports all components and utilities', () => {
return matchExports({ cwd: __dirname, keys: Object.keys(rootIndex).sort() });
it('exports all components and utilities', async () => {
const exports = await getExports({ cwd: __dirname });

expect(Object.keys(rootIndex).sort()).toEqual(exports);
});
});
8 changes: 5 additions & 3 deletions packages/ranges/src/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

import { matchExports } from '@zendeskgarden/react-testing';
import { getExports } from '@zendeskgarden/react-testing';
import * as rootIndex from './';

describe('Index', () => {
it('exports all components and utilities', () => {
return matchExports({ cwd: __dirname, keys: Object.keys(rootIndex).sort() });
it('exports all components and utilities', async () => {
const exports = await getExports({ cwd: __dirname });

expect(Object.keys(rootIndex).sort()).toEqual(exports);
});
});
8 changes: 5 additions & 3 deletions packages/select/src/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

import { matchExports } from '@zendeskgarden/react-testing';
import { getExports } from '@zendeskgarden/react-testing';
import * as rootIndex from './';

describe('Index', () => {
it('exports all components and utilities', () => {
return matchExports({ cwd: __dirname, keys: Object.keys(rootIndex).sort() });
it('exports all components and utilities', async () => {
const exports = await getExports({ cwd: __dirname });

expect(Object.keys(rootIndex).sort()).toEqual(exports);
});
});
8 changes: 5 additions & 3 deletions packages/selection/src/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

import { matchExports } from '@zendeskgarden/react-testing';
import { getExports } from '@zendeskgarden/react-testing';
import * as rootIndex from './';

describe('Index', () => {
it('exports all components and utilities', () => {
return matchExports({ cwd: __dirname, keys: Object.keys(rootIndex).sort() });
it('exports all components and utilities', async () => {
const exports = await getExports({ cwd: __dirname });

expect(Object.keys(rootIndex).sort()).toEqual(exports);
});
});
8 changes: 5 additions & 3 deletions packages/tables/src/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

import { matchExports } from '@zendeskgarden/react-testing';
import { getExports } from '@zendeskgarden/react-testing';
import * as rootIndex from './';

describe('Index', () => {
it('exports all components and utilities', () => {
return matchExports({ cwd: __dirname, keys: Object.keys(rootIndex).sort() });
it('exports all components and utilities', async () => {
const exports = await getExports({ cwd: __dirname });

expect(Object.keys(rootIndex).sort()).toEqual(exports);
});
});
8 changes: 5 additions & 3 deletions packages/tabs/src/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

import { matchExports } from '@zendeskgarden/react-testing';
import { getExports } from '@zendeskgarden/react-testing';
import * as rootIndex from './';

describe('Index', () => {
it('exports all components and utilities', () => {
return matchExports({ cwd: __dirname, keys: Object.keys(rootIndex).sort() });
it('exports all components and utilities', async () => {
const exports = await getExports({ cwd: __dirname });

expect(Object.keys(rootIndex).sort()).toEqual(exports);
});
});
8 changes: 5 additions & 3 deletions packages/tags/src/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

import { matchExports } from '@zendeskgarden/react-testing';
import { getExports } from '@zendeskgarden/react-testing';
import * as rootIndex from './';

describe('Index', () => {
it('exports all components and utilities', () => {
return matchExports({ cwd: __dirname, keys: Object.keys(rootIndex).sort() });
it('exports all components and utilities', async () => {
const exports = await getExports({ cwd: __dirname });

expect(Object.keys(rootIndex).sort()).toEqual(exports);
});
});
2 changes: 1 addition & 1 deletion packages/testing/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
export { default as mountWithTheme } from './utils/mountWithTheme.js';
export { default as renderWithTheme } from './utils/renderWithTheme.js';
export { default as shallowWithTheme } from './utils/shallowWithTheme.js';
export { default as matchExports } from './utils/matchExports.js';
export { default as getExports } from './utils/getExports.js';
8 changes: 5 additions & 3 deletions packages/testing/src/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

import matchExports from './utils/matchExports';
import { getExports } from '@zendeskgarden/react-testing';
import * as rootIndex from './';

describe('Index', () => {
it('exports all components and utilities', () => {
return matchExports({ cwd: __dirname, keys: Object.keys(rootIndex).sort() });
it('exports all components and utilities', async () => {
const exports = await getExports({ cwd: __dirname });

expect(Object.keys(rootIndex).sort()).toEqual(exports);
});
});
16 changes: 16 additions & 0 deletions packages/testing/src/utils/getExports.example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Signature:

- `getExports({ globPath: string, cwd: string, fileMapper: function })`

```jsx static
import { getExports } from '@zendeskgarden/react-testing';
import * as rootIndex from './';

describe('Index', () => {
it('exports all components and utilities', async () => {
const exports = await getExports({ cwd: __dirname });

expect(Object.keys(rootIndex).sort()).toEqual(exports);
});
});
```
Loading