[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests(smokehouse): assert on expected array length #9292

Merged
merged 5 commits into from
Jul 9, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
drop the 'is'. it's cleaner.
  • Loading branch information
connorjclark committed Jul 8, 2019
commit 25469435557acbc8cc4ea37fb590f21cc182a38b
10 changes: 5 additions & 5 deletions lighthouse-cli/test/smokehouse/error-expectations.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

// Just using `[]` actually asserts for an empty array.
// Use this expectation object to assert an array with at least one element.
const IS_NONEMPTY_ARRAY = {
const NONEMPTY_ARRAY = {
length: '>0',
};

Expand All @@ -30,10 +30,10 @@ module.exports = [
artifacts: {
PageLoadError: {code: 'PAGE_HUNG'},
devtoolsLogs: {
'pageLoadError-defaultPass': IS_NONEMPTY_ARRAY,
'pageLoadError-defaultPass': NONEMPTY_ARRAY,
},
traces: {
'pageLoadError-defaultPass': {traceEvents: IS_NONEMPTY_ARRAY},
'pageLoadError-defaultPass': {traceEvents: NONEMPTY_ARRAY},
},
},
},
Expand All @@ -52,10 +52,10 @@ module.exports = [
artifacts: {
PageLoadError: {code: 'INSECURE_DOCUMENT_REQUEST'},
devtoolsLogs: {
'pageLoadError-defaultPass': IS_NONEMPTY_ARRAY,
'pageLoadError-defaultPass': NONEMPTY_ARRAY,
},
traces: {
'pageLoadError-defaultPass': {traceEvents: IS_NONEMPTY_ARRAY},
'pageLoadError-defaultPass': {traceEvents: NONEMPTY_ARRAY},
},
},
},
Expand Down