Skip to content

Commit c1c23cc

Browse files
committed
refactor around platforms
1 parent 35f2d05 commit c1c23cc

File tree

165 files changed

+772
-807
lines changed

Some content is hidden

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

165 files changed

+772
-807
lines changed

__tests__/jest/components/Artboard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import * as renderer from 'react-test-renderer';
3-
import Artboard from '../../../src/components/Artboard';
4-
import StyleSheet from '../../../src/stylesheet';
3+
import { Artboard } from '../../../src/components/Artboard';
4+
import { StyleSheet } from '../../../src/stylesheet';
55

66
describe('<Artboard />', () => {
77
it('renders children', () => {

__tests__/jest/components/Document.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import * as renderer from 'react-test-renderer';
3-
import Document from '../../../src/components/Document';
3+
import { Document } from '../../../src/components/Document';
44

55
describe('<Document />', () => {
66
it('renders children', () => {

__tests__/jest/components/Image.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import * as renderer from 'react-test-renderer';
3-
import Image from '../../../src/components/Image';
4-
import StyleSheet from '../../../src/stylesheet';
3+
import { Image } from '../../../src/components/Image';
4+
import { StyleSheet } from '../../../src/stylesheet';
55

66
describe('<Image />', () => {
77
it('renders children', () => {

__tests__/jest/components/Page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import * as renderer from 'react-test-renderer';
3-
import Page from '../../../src/components/Page';
3+
import { Page } from '../../../src/components/Page';
44

55
describe('<Page />', () => {
66
it('renders children', () => {

__tests__/jest/components/RedBox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react';
22
import * as renderer from 'react-test-renderer';
3-
import RedBox from '../../../src/components/RedBox';
3+
import { RedBox } from '../../../src/components/RedBox';
44

55
describe('<RedBox />', () => {
66
it('renders simple errors', () => {

__tests__/jest/components/Text.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import * as renderer from 'react-test-renderer';
3-
import Text from '../../../src/components/Text';
4-
import StyleSheet from '../../../src/stylesheet';
3+
import { Text } from '../../../src/components/Text';
4+
import { StyleSheet } from '../../../src/stylesheet';
55

66
describe('<Text />', () => {
77
it('passes its children', () => {

__tests__/jest/components/View.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import * as renderer from 'react-test-renderer';
3-
import View from '../../../src/components/View';
4-
import StyleSheet from '../../../src/stylesheet';
3+
import { View } from '../../../src/components/View';
4+
import { StyleSheet } from '../../../src/stylesheet';
55

66
describe('<View />', () => {
77
it('passes its children', () => {

__tests__/jest/components/nodeImpl/Svg.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import * as React from 'react';
22

3-
import ReactSketch from '../../../../src';
3+
import * as ReactSketch from '../../../../src';
44
import Svg from '../../../../src/components/Svg';
55

66
jest.mock('../../../../src/jsonUtils/models', () => ({
77
...require.requireActual('../../../../src/jsonUtils/models'),
8-
generateID: jest.fn(seed => (seed ? `${seed}mockID` : 'mockID')),
8+
generateID: jest.fn((seed) => (seed ? `${seed}mockID` : 'mockID')),
99
}));
1010

1111
describe('node <Svg />', () => {

__tests__/jest/index.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
import ReactSketch from '../../src';
2-
jest.mock('../../src/jsonUtils/sketchImpl/createStringMeasurer');
3-
jest.mock('../../src/jsonUtils/sketchImpl/findFontName');
4-
jest.mock('../../src/jsonUtils/sketchImpl/makeImageDataFromUrl');
5-
jest.mock('../../src/jsonUtils/sketchImpl/makeSvgLayer');
1+
import * as ReactSketch from '../../src';
62

73
describe('public API', () => {
84
it('exports render', () => {

__tests__/jest/jsonUtils/computeTextTree.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import computeTextTree from '../../../src/jsonUtils/computeTextTree';
2-
import Context from '../../../src/utils/Context';
1+
import { computeTextTree } from '../../../src/jsonUtils/computeTextTree';
2+
import { Context } from '../../../src/utils/Context';
33

44
// Example Text component tree
55
const treeStub = {

0 commit comments

Comments
 (0)