Skip to content

Commit

Permalink
Small reorg of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Pawel.Majewski committed May 17, 2017
1 parent ed86dcc commit 2dfd8cb
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"compile": "tsc",
"bundle": "webpack --config webpack.config.js",
"bundle:min": "webpack --config webpack.config.min.js",
"test": "nyc mocha test/**/*.spec.js",
"test": "nyc mocha test/unit/**/*.spec.js",
"build": "npm run compile && npm run test && npm run bundle && npm run bundle:min"
}
}
Empty file removed test/redyxTx.spec.ts
Empty file.
4 changes: 2 additions & 2 deletions test/lib/actions.spec.ts → test/unit/lib/actions.spec.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {expect} from '../utils/expect';
import {expect} from '../../utils/expect';
import {
CANCEL_TRANSACTION_ACTION_TYPE,
cancelTransactionAction,
COMMIT_TRANSACTION_ACTION_TYPE, commitTransactionAction, REJECT_TRANSACTION_ACTION_TYPE, rejectTransactionAction,
START_TRANSACTION_ACTION_TYPE,
startTransactionAction, TIMEOUT_TRANSACTION_ACTION_TYPE, timeoutTransactionAction
} from '../../lib/actions';
} from '../../../lib/actions';

describe('action factory', () => {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {expect} from '../utils/expect';
import {expect} from '../../utils/expect';
import 'zone.js';
import {transactionMiddleware} from '../../lib/middleware';
import {TRANSACTION_ID_ZONE_KEY} from '../../lib/transaction';
import {transactionMiddleware} from '../../../lib/middleware';
import {TRANSACTION_ID_ZONE_KEY} from '../../../lib/transaction';
import {Dispatch, MiddlewareAPI} from 'redux';
import * as sinon from "sinon";
import {START_TRANSACTION_ACTION_TYPE} from '../../lib/actions';
import {START_TRANSACTION_ACTION_TYPE} from '../../../lib/actions';


describe('middleeware', () => {
Expand Down
6 changes: 3 additions & 3 deletions test/lib/reducer.spec.ts → test/unit/lib/reducer.spec.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {expect} from '../utils/expect';
import {expect} from '../../utils/expect';
import * as sinon from "sinon";
import {Action, Reducer} from 'redux';
import {transactionReducer} from "../../index";
import {transactionReducer} from "../../../index";
import {
CANCEL_TRANSACTION_ACTION_TYPE, COMMIT_TRANSACTION_ACTION_TYPE, REJECT_TRANSACTION_ACTION_TYPE, START_TRANSACTION_ACTION_TYPE,
TIMEOUT_TRANSACTION_ACTION_TYPE
} from '../../lib/actions';
} from '../../../lib/actions';


describe('reducer', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import {expect} from '../utils/expect';
import {expect} from '../../utils/expect';
import * as sinon from "sinon";
import {Dispatch} from 'redux';
import {setTransactionTimeout, transaction} from '../../lib/transaction';
import {setTransactionTimeout, transaction} from '../../../lib/transaction';
import {
CANCEL_TRANSACTION_ACTION_TYPE, COMMIT_TRANSACTION_ACTION_TYPE, REJECT_TRANSACTION_ACTION_TYPE,
START_TRANSACTION_ACTION_TYPE, TIMEOUT_TRANSACTION_ACTION_TYPE
} from '../../lib/actions';
import {semaphore} from '../utils/promise';
} from '../../../lib/actions';
import {semaphore} from '../../utils/promise';

describe('transaction', () => {
let dispatch: sinon.SinonSpy;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {expect} from '../../utils/expect';
import {optimisticMerge} from '../../../lib/utils/optimisticMerge';
import {expect} from '../../../utils/expect';
import {optimisticMerge} from '../../../../lib/utils/optimisticMerge';

describe('optimisticMerge', () => {

Expand Down

0 comments on commit 2dfd8cb

Please sign in to comment.