mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-01-31 03:36:44 +03:00
chore(*): enable tests in travis build (#554)
* Enable test all * Fix instrument tests
This commit is contained in:
parent
3ab39bf322
commit
fead81ca9e
|
@ -9,4 +9,4 @@ cache:
|
||||||
script:
|
script:
|
||||||
- yarn build:all
|
- yarn build:all
|
||||||
- yarn lint:all
|
- yarn lint:all
|
||||||
- yarn test
|
- yarn test:all
|
||||||
|
|
|
@ -80,7 +80,7 @@ export const ActionCreators = {
|
||||||
stack = frames
|
stack = frames
|
||||||
.slice(
|
.slice(
|
||||||
0,
|
0,
|
||||||
traceLimit + extraFrames + (frames[0] === 'Error' ? 1 : 0)
|
traceLimit + extraFrames + (frames[0].startsWith('Error') ? 1 : 0)
|
||||||
)
|
)
|
||||||
.join('\n');
|
.join('\n');
|
||||||
}
|
}
|
||||||
|
|
|
@ -827,10 +827,9 @@ describe('instrument', () => {
|
||||||
exportedState = monitoredLiftedStore.getState();
|
exportedState = monitoredLiftedStore.getState();
|
||||||
expect(exportedState.actionsById[0].stack).toBe(undefined);
|
expect(exportedState.actionsById[0].stack).toBe(undefined);
|
||||||
expect(typeof exportedState.actionsById[1].stack).toBe('string');
|
expect(typeof exportedState.actionsById[1].stack).toBe('string');
|
||||||
expect(exportedState.actionsById[1].stack).toMatch(/\bat dispatch\b/);
|
|
||||||
expect(exportedState.actionsById[1].stack).toMatch(/\bfn1\b/);
|
expect(exportedState.actionsById[1].stack).toMatch(/\bfn1\b/);
|
||||||
expect(exportedState.actionsById[1].stack).toMatch(/\bfn2\b/);
|
expect(exportedState.actionsById[1].stack).toMatch(/\bfn2\b/);
|
||||||
expect(exportedState.actionsById[1].stack).not.toMatch(/\bfn3\b/);
|
expect(exportedState.actionsById[1].stack).toMatch(/\bfn3\b/);
|
||||||
expect(exportedState.actionsById[1].stack).not.toMatch(/\bfn4\b/);
|
expect(exportedState.actionsById[1].stack).not.toMatch(/\bfn4\b/);
|
||||||
expect(exportedState.actionsById[1].stack).toContain(
|
expect(exportedState.actionsById[1].stack).toContain(
|
||||||
'instrument.spec.js'
|
'instrument.spec.js'
|
||||||
|
@ -865,10 +864,9 @@ describe('instrument', () => {
|
||||||
exportedState = monitoredLiftedStore.getState();
|
exportedState = monitoredLiftedStore.getState();
|
||||||
expect(exportedState.actionsById[0].stack).toBe(undefined);
|
expect(exportedState.actionsById[0].stack).toBe(undefined);
|
||||||
expect(typeof exportedState.actionsById[1].stack).toBe('string');
|
expect(typeof exportedState.actionsById[1].stack).toBe('string');
|
||||||
expect(exportedState.actionsById[1].stack).toMatch(/\bat dispatch\b/);
|
|
||||||
expect(exportedState.actionsById[1].stack).toMatch(/\bfn1\b/);
|
expect(exportedState.actionsById[1].stack).toMatch(/\bfn1\b/);
|
||||||
expect(exportedState.actionsById[1].stack).toMatch(/\bfn2\b/);
|
expect(exportedState.actionsById[1].stack).toMatch(/\bfn2\b/);
|
||||||
expect(exportedState.actionsById[1].stack).not.toMatch(/\bfn3\b/);
|
expect(exportedState.actionsById[1].stack).toMatch(/\bfn3\b/);
|
||||||
expect(exportedState.actionsById[1].stack).not.toMatch(/\bfn4\b/);
|
expect(exportedState.actionsById[1].stack).not.toMatch(/\bfn4\b/);
|
||||||
expect(exportedState.actionsById[1].stack).toContain(
|
expect(exportedState.actionsById[1].stack).toContain(
|
||||||
'instrument.spec.js'
|
'instrument.spec.js'
|
||||||
|
@ -985,7 +983,7 @@ describe('instrument', () => {
|
||||||
exportedState = monitoredLiftedStore.getState();
|
exportedState = monitoredLiftedStore.getState();
|
||||||
expect(exportedState.actionsById[0].stack).toBe(undefined);
|
expect(exportedState.actionsById[0].stack).toBe(undefined);
|
||||||
expect(typeof exportedState.actionsById[1].stack).toBe('string');
|
expect(typeof exportedState.actionsById[1].stack).toBe('string');
|
||||||
expect(exportedState.actionsById[1].stack).toContain('at performAction');
|
expect(exportedState.actionsById[1].stack).toContain('at Object.performAction');
|
||||||
expect(exportedState.actionsById[1].stack).toContain('instrument.js');
|
expect(exportedState.actionsById[1].stack).toContain('instrument.js');
|
||||||
expect(exportedState.actionsById[1].stack).toContain(
|
expect(exportedState.actionsById[1].stack).toContain(
|
||||||
'instrument.spec.js'
|
'instrument.spec.js'
|
||||||
|
@ -1007,7 +1005,7 @@ describe('instrument', () => {
|
||||||
expect(exportedState.actionsById[0].stack).toBe(undefined);
|
expect(exportedState.actionsById[0].stack).toBe(undefined);
|
||||||
expect(typeof exportedState.actionsById[1].stack).toBe('string');
|
expect(typeof exportedState.actionsById[1].stack).toBe('string');
|
||||||
expect(exportedState.actionsById[1].stack).toContain(
|
expect(exportedState.actionsById[1].stack).toContain(
|
||||||
'at performAction'
|
'at Object.performAction'
|
||||||
);
|
);
|
||||||
expect(exportedState.actionsById[1].stack).toContain('instrument.js');
|
expect(exportedState.actionsById[1].stack).toContain('instrument.js');
|
||||||
expect(exportedState.actionsById[1].stack).toContain(
|
expect(exportedState.actionsById[1].stack).toContain(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user