Skip to content

Commit

Permalink
chore: configure global types for jest (#180)
Browse files Browse the repository at this point in the history
Using configuration suggested by `jest-extended`.
https://github.com/jest-community/jest-extended#typescript
  • Loading branch information
jdanil authored Apr 29, 2020
1 parent ab540ff commit 3a5fee2
Show file tree
Hide file tree
Showing 13 changed files with 2 additions and 12 deletions.
1 change: 0 additions & 1 deletion packages/babel-plugin/src/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { transformSync, TransformOptions } from '@babel/core';
import 'jest-extended';
import compiledPlugin from '../index';

const babelOpts: TransformOptions = {
Expand Down
1 change: 0 additions & 1 deletion packages/css-in-js/src/__tests__/browser.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { render } from '@testing-library/react';
import 'jest-extended';
import { styled } from '@compiled/css-in-js';

describe('browser', () => {
Expand Down
1 change: 0 additions & 1 deletion packages/css-in-js/src/__tests__/ssr.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*/
import React from 'react';
import { renderToStaticMarkup } from 'react-dom/server';
import 'jest-extended';
import { styled, CC } from '@compiled/css-in-js';

describe('SSR', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { render } from '@testing-library/react';
import React from 'react';
import { ClassNames } from '@compiled/css-in-js';
import '@compiled/jest-css-in-js';

describe('class names component', () => {
it('should create css from object literal', () => {
Expand Down
1 change: 0 additions & 1 deletion packages/css-in-js/src/jsx/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import '@compiled/css-in-js';
import React from 'react';
import { render } from '@testing-library/react';
import '@compiled/jest-css-in-js';

describe('css prop', () => {
it('should create css from object literal', () => {
Expand Down
1 change: 0 additions & 1 deletion packages/css-in-js/src/styled/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import { render } from '@testing-library/react';
import { styled } from '@compiled/css-in-js';
import { em } from 'polished';
import '@compiled/jest-css-in-js';

describe('styled component', () => {
it('should render a simple styled div using an object', () => {
Expand Down
1 change: 0 additions & 1 deletion packages/style/src/__tests__/style-ssr.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*/
import React from 'react';
import { renderToStaticMarkup } from 'react-dom/server';
import 'jest-extended';
import Style from '../style';

describe('<Style />', () => {
Expand Down
1 change: 0 additions & 1 deletion packages/style/src/__tests__/style.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { render } from '@testing-library/react';
import 'jest-extended';
import Style from '../style';

describe('<Style />', () => {
Expand Down
1 change: 0 additions & 1 deletion packages/ts-transform/src/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as ts from 'typescript';
import { Transformer } from 'ts-transformer-testing-library';
import 'jest-extended';
import rootTransformer from '../index';

const stubProgam: ts.Program = ({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as ts from 'typescript';
import { Transformer } from 'ts-transformer-testing-library';
import 'jest-extended';
import classNamesTransformer from '../index';

jest.mock('../../utils/hash');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as ts from 'typescript';
import { Transformer } from 'ts-transformer-testing-library';
import 'jest-extended';
import cssPropTransformer from '../index';

jest.mock('../../utils/hash');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as ts from 'typescript';
import { Transformer } from 'ts-transformer-testing-library';
import 'jest-extended';
import styledComponentTransformer from '../index';

jest.mock('../../utils/hash');
Expand Down
2 changes: 2 additions & 0 deletions test/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import '@compiled/jest-css-in-js';
import 'jest-extended';

0 comments on commit 3a5fee2

Please sign in to comment.