chore(*): enable tests in travis build (#554)

* Enable test all

* Fix instrument tests
This commit is contained in:
Nathan Bierema 2020-08-02 00:04:41 -04:00 committed by GitHub
parent 3ab39bf322
commit fead81ca9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 8 deletions

View File

@ -9,4 +9,4 @@ cache:
script:
- yarn build:all
- yarn lint:all
- yarn test
- yarn test:all

View File

@ -80,7 +80,7 @@ export const ActionCreators = {
stack = frames
.slice(
0,
traceLimit + extraFrames + (frames[0] === 'Error' ? 1 : 0)
traceLimit + extraFrames + (frames[0].startsWith('Error') ? 1 : 0)
)
.join('\n');
}

View File

@ -827,10 +827,9 @@ describe('instrument', () => {
exportedState = monitoredLiftedStore.getState();
expect(exportedState.actionsById[0].stack).toBe(undefined);
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(/\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).toContain(
'instrument.spec.js'
@ -865,10 +864,9 @@ describe('instrument', () => {
exportedState = monitoredLiftedStore.getState();
expect(exportedState.actionsById[0].stack).toBe(undefined);
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(/\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).toContain(
'instrument.spec.js'
@ -985,7 +983,7 @@ describe('instrument', () => {
exportedState = monitoredLiftedStore.getState();
expect(exportedState.actionsById[0].stack).toBe(undefined);
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.spec.js'
@ -1007,7 +1005,7 @@ describe('instrument', () => {
expect(exportedState.actionsById[0].stack).toBe(undefined);
expect(typeof exportedState.actionsById[1].stack).toBe('string');
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(