Renames tests, simplifies tsconfigs
This commit is contained in:
parent
b8f410b752
commit
6aa58c7966
51 changed files with 43 additions and 63 deletions
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import { renderWithSvg } from '+test-utils'
|
||||
import { renderWithSvg } from '+test'
|
||||
import { Binding } from './binding'
|
||||
|
||||
jest.spyOn(console, 'error').mockImplementation(() => void null)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import { renderWithSvg } from '+test-utils'
|
||||
import { renderWithSvg } from '+test'
|
||||
import { Bounds } from './bounds'
|
||||
|
||||
describe('bounds', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import { renderWithSvg } from '+test-utils'
|
||||
import { renderWithSvg } from '+test'
|
||||
import { Brush } from './brush'
|
||||
|
||||
describe('brush', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import { mockDocument, renderWithContext } from '+test-utils'
|
||||
import { mockDocument, renderWithContext } from '+test'
|
||||
import { Canvas } from './canvas'
|
||||
|
||||
describe('page', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import { renderWithSvg } from '+test-utils'
|
||||
import { renderWithSvg } from '+test'
|
||||
import { Defs } from './defs'
|
||||
|
||||
describe('defs', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import { renderWithContext } from '+test-utils'
|
||||
import { renderWithContext } from '+test'
|
||||
import { ErrorFallback } from './error-fallback'
|
||||
|
||||
describe('error fallback', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import { mockUtils, renderWithContext } from '+test-utils'
|
||||
import { mockUtils, renderWithContext } from '+test'
|
||||
import { Handles } from './handles'
|
||||
|
||||
describe('handles', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import { mockDocument, renderWithContext } from '+test-utils'
|
||||
import { mockDocument, renderWithContext } from '+test'
|
||||
import { Page } from './page'
|
||||
|
||||
describe('page', () => {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import { mockDocument } from '+test-utils/mockDocument'
|
||||
import { mockUtils } from '+test-utils/mockUtils'
|
||||
import { mockDocument, mockUtils } from '+test'
|
||||
import { render } from '@testing-library/react'
|
||||
import { Renderer } from './renderer'
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import { mockUtils, renderWithSvg } from '+test-utils'
|
||||
import { mockUtils, renderWithSvg } from '+test'
|
||||
import { ShapeIndicator } from './shape-indicator'
|
||||
|
||||
describe('shape indicator', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import { mockUtils, renderWithSvg } from '+test-utils'
|
||||
import { mockUtils, renderWithSvg } from '+test'
|
||||
import { Shape } from './shape'
|
||||
|
||||
describe('handles', () => {
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"include": ["src"],
|
||||
"extends": "./tsconfig.json",
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"**/*.test.tsx",
|
||||
"**/*.test.ts",
|
||||
"**/*.spec.tsx",
|
||||
"**/*.spec.ts",
|
||||
"src/test-utils",
|
||||
"src/test",
|
||||
"dist"
|
||||
],
|
||||
"compilerOptions": {
|
||||
"declaration": true,
|
||||
"rootDir": "src",
|
||||
"outDir": "./dist/types",
|
||||
"baseUrl": "src",
|
||||
"paths": {
|
||||
"+*": ["./*"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as React from 'react'
|
||||
import { ContextMenu } from './context-menu'
|
||||
import { renderWithContext } from '~test-utils'
|
||||
import { renderWithContext } from '~test'
|
||||
|
||||
describe('context menu', () => {
|
||||
test('mounts component', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react'
|
||||
import { renderWithContext } from '~test-utils'
|
||||
import { renderWithContext } from '~test'
|
||||
import { StylePanel } from './style-panel'
|
||||
|
||||
describe('style panel', () => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as React from 'react'
|
||||
import { ToolsPanel } from './tools-panel'
|
||||
import { renderWithContext } from '~test-utils'
|
||||
import { renderWithContext } from '~test'
|
||||
|
||||
describe('tools panel', () => {
|
||||
test('mounts component', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { TLDrawState } from '~state'
|
||||
import { mockDocument } from '~test-utils'
|
||||
import { mockDocument } from '~test'
|
||||
import { AlignType } from '~types'
|
||||
|
||||
describe('Align command', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { TLDrawState } from '~state'
|
||||
import { mockDocument } from '~test-utils'
|
||||
import { mockDocument } from '~test'
|
||||
|
||||
describe('Create command', () => {
|
||||
const tlstate = new TLDrawState()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { TLDR } from '~state/tldr'
|
||||
import { TLDrawState } from '~state'
|
||||
import { mockDocument } from '~test-utils'
|
||||
import { mockDocument } from '~test'
|
||||
import type { TLDrawShape } from '~types'
|
||||
|
||||
describe('Delete command', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { TLDrawState } from '~state'
|
||||
import { mockDocument } from '~test-utils'
|
||||
import { mockDocument } from '~test'
|
||||
import { DistributeType } from '~types'
|
||||
|
||||
describe('Distribute command', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { TLDrawState } from '~state'
|
||||
import { mockDocument } from '~test-utils'
|
||||
import { mockDocument } from '~test'
|
||||
|
||||
describe('Duplicate command', () => {
|
||||
const tlstate = new TLDrawState()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { TLDrawState } from '~state'
|
||||
import { mockDocument } from '~test-utils'
|
||||
import { mockDocument } from '~test'
|
||||
import type { RectangleShape } from '~types'
|
||||
|
||||
describe('Stretch command', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { TLDrawState } from '~state'
|
||||
import { mockDocument } from '~test-utils'
|
||||
import { mockDocument } from '~test'
|
||||
import { Utils } from '@tldraw/core'
|
||||
import type { Data } from '~types'
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { TLDrawState } from '~state'
|
||||
import { mockDocument } from '~test-utils'
|
||||
import { mockDocument } from '~test'
|
||||
|
||||
describe('Rotate command', () => {
|
||||
const tlstate = new TLDrawState()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { StretchType, RectangleShape } from '~types'
|
||||
import { TLDrawState } from '~state'
|
||||
import { mockDocument } from '~test-utils'
|
||||
import { mockDocument } from '~test'
|
||||
|
||||
describe('Stretch command', () => {
|
||||
const tlstate = new TLDrawState()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { TLDrawState } from '~state'
|
||||
import { mockDocument } from '~test-utils'
|
||||
import { mockDocument } from '~test'
|
||||
import { SizeStyle } from '~types'
|
||||
|
||||
describe('Style command', () => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { TLDR } from '~state/tldr'
|
||||
import { TLDrawState } from '~state'
|
||||
import { mockDocument } from '~test-utils'
|
||||
import { mockDocument } from '~test'
|
||||
import { ArrowShape, Decoration, TLDrawShape } from '~types'
|
||||
|
||||
describe('Handle command', () => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import type { RectangleShape } from '~types'
|
||||
import { TLDrawState } from '~state'
|
||||
import { mockDocument } from '~test-utils'
|
||||
import { mockDocument } from '~test'
|
||||
|
||||
describe('Toggle command', () => {
|
||||
const tlstate = new TLDrawState()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { TLDrawState } from '~state'
|
||||
import { mockDocument } from '~test-utils'
|
||||
import { mockDocument } from '~test'
|
||||
|
||||
describe('Translate command', () => {
|
||||
const tlstate = new TLDrawState()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { TLDrawState } from '~state'
|
||||
import { mockDocument } from '~test-utils'
|
||||
import { mockDocument } from '~test'
|
||||
import { TLDR } from '~state/tldr'
|
||||
import type { ArrowShape, TLDrawShape } from '~types'
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { TLDrawState } from '~state'
|
||||
import { mockDocument } from '~test-utils'
|
||||
import { mockDocument } from '~test'
|
||||
|
||||
describe('Brush session', () => {
|
||||
const tlstate = new TLDrawState()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { TLDrawState } from '~state'
|
||||
import { mockDocument } from '~test-utils'
|
||||
import { mockDocument } from '~test'
|
||||
import { ColorStyle, DashStyle, SizeStyle, TLDrawShapeType } from '~types'
|
||||
|
||||
describe('Transform session', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { TLDrawState } from '~state'
|
||||
import { mockDocument } from '~test-utils'
|
||||
import { mockDocument } from '~test'
|
||||
import { TLDR } from '~state/tldr'
|
||||
import type { TLDrawShape } from '~types'
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { TLDrawState } from '~state'
|
||||
import { mockDocument } from '~test-utils'
|
||||
import { mockDocument } from '~test'
|
||||
|
||||
describe('Brush session', () => {
|
||||
const tlstate = new TLDrawState()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { TLDrawState } from '~state'
|
||||
import { mockDocument } from '~test-utils'
|
||||
import { mockDocument } from '~test'
|
||||
import { TLDR } from '~state/tldr'
|
||||
import { TextShape, TLDrawShape, TLDrawShapeType } from '~types'
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { TLDrawState } from '~state'
|
||||
import { mockDocument } from '~test-utils'
|
||||
import { mockDocument } from '~test'
|
||||
import { TLBoundsCorner } from '@tldraw/core'
|
||||
|
||||
describe('Transform single session', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { TLDrawState } from '~state'
|
||||
import { mockDocument } from '~test-utils'
|
||||
import { mockDocument } from '~test'
|
||||
import { TLBoundsCorner, Utils } from '@tldraw/core'
|
||||
import { TLDR } from '~state/tldr'
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { TLDR } from '~state/tldr'
|
||||
import { TLDrawState } from '~state'
|
||||
import { mockDocument } from '~test-utils'
|
||||
import { mockDocument } from '~test'
|
||||
import type { TLDrawShape } from '~types'
|
||||
|
||||
describe('Brush session', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { TLDrawState } from './tlstate'
|
||||
import { mockDocument, TLStateUtils } from '~test-utils'
|
||||
import { mockDocument, TLStateUtils } from '~test'
|
||||
|
||||
describe('TLDrawState', () => {
|
||||
const tlstate = new TLDrawState()
|
||||
|
|
|
@ -1,21 +1,12 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"include": ["src"],
|
||||
"extends": "./tsconfig.json",
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"**/*.test.tsx",
|
||||
"**/*.test.ts",
|
||||
"**/*.spec.tsx",
|
||||
"**/*.spec.ts",
|
||||
"src/test-utils",
|
||||
"src/test",
|
||||
"dist"
|
||||
],
|
||||
"compilerOptions": {
|
||||
"rootDir": "src",
|
||||
"outDir": "./dist/types",
|
||||
"baseUrl": "src",
|
||||
"paths": {
|
||||
"~*": ["./*"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue