Skip to content

Commit eb88536

Browse files
committed
Run tests from source instead of building first
1 parent a5e4f95 commit eb88536

File tree

9 files changed

+15
-10
lines changed

9 files changed

+15
-10
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,11 @@
4848
"format:check": "prettier --list-different \"{src,test}/**/*.{js,ts}\" \"**/*.md\"",
4949
"lint": "eslint --ext js,ts src test",
5050
"check-types": "tsc --noEmit",
51-
"test": "jest && tsc -p test/typescript",
51+
"test": "jest",
5252
"test:types": "tsc -p test/typescript",
5353
"test:watch": "jest --watch",
5454
"test:cov": "jest --coverage",
5555
"build": "rollup -c",
56-
"pretest": "npm run build",
5756
"prepublishOnly": "npm run clean && npm run check-types && npm run format:check && npm run lint && npm test",
5857
"examples:lint": "eslint --ext js,ts examples",
5958
"examples:test": "cross-env CI=true babel-node examples/testAll.js"

test/applyMiddleware.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
Action,
88
Store,
99
Dispatch
10-
} from '..'
10+
} from '../src'
1111
import * as reducers from './helpers/reducers'
1212
import { addTodo, addTodoAsync, addTodoIfEmpty } from './helpers/actionCreators'
1313
import { thunk } from './helpers/middleware'

test/bindActionCreators.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { bindActionCreators, createStore, ActionCreator, Store } from '..'
1+
import { bindActionCreators, createStore, ActionCreator, Store } from '../src'
22
import { todos } from './helpers/reducers'
33
import * as actionCreators from './helpers/actionCreators'
44

test/combineReducers.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
Reducer,
66
AnyAction,
77
__DO_NOT_USE__ActionTypes as ActionTypes
8-
} from '..'
8+
} from '../src'
99

1010
describe('Utils', () => {
1111
describe('combineReducers', () => {

test/compose.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { compose } from '..'
1+
import { compose } from '../src'
22

33
describe('Utils', () => {
44
describe('compose', () => {

test/createStore.spec.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
import { createStore, combineReducers, StoreEnhancer, Action, Store } from '..'
1+
import {
2+
createStore,
3+
combineReducers,
4+
StoreEnhancer,
5+
Action,
6+
Store
7+
} from '../src'
28
import {
39
addTodo,
410
dispatchInMiddle,

test/helpers/actionCreators.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
THROW_ERROR,
88
UNKNOWN_ACTION
99
} from './actionTypes'
10-
import { Action, AnyAction, Dispatch } from '../..'
10+
import { Action, AnyAction, Dispatch } from '../../src'
1111

1212
export function addTodo(text: string): AnyAction {
1313
return { type: ADD_TODO, text }

test/helpers/middleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { MiddlewareAPI, Dispatch, AnyAction } from '../..'
1+
import { MiddlewareAPI, Dispatch, AnyAction } from '../../src'
22

33
type ThunkAction<T extends any = any> = T extends AnyAction
44
? AnyAction

test/helpers/reducers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
UNSUBSCRIBE_IN_MIDDLE,
77
THROW_ERROR
88
} from './actionTypes'
9-
import { AnyAction } from '../..'
9+
import { AnyAction } from '../../src'
1010

1111
function id(state: { id: number }[]) {
1212
return (

0 commit comments

Comments
 (0)