Skip to content

Commit c30c1ba

Browse files
fix sorting
1 parent 04a6af6 commit c30c1ba

File tree

1 file changed

+15
-20
lines changed

1 file changed

+15
-20
lines changed

integration-tests/cypress/cypress.spec.js

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -789,19 +789,20 @@ moduleTypes.forEach(({
789789
)
790790
assert.ok(testModuleEventContent.meta[TEST_FRAMEWORK_VERSION])
791791

792-
assertObjectContains(testSuiteEvents.map(suite => suite.content.resource), [
793-
'test_suite.cypress/e2e/spec.cy.js',
794-
'test_suite.cypress/e2e/other.cy.js',
795-
'test_suite.cypress/e2e/hook-test-error.cy.js',
796-
'test_suite.cypress/e2e/hook-describe-error.cy.js',
797-
])
792+
assert.deepStrictEqual(
793+
testSuiteEvents.map(suite => suite.content.resource).sort(),
794+
[
795+
'test_suite.cypress/e2e/hook-describe-error.cy.js',
796+
'test_suite.cypress/e2e/hook-test-error.cy.js',
797+
'test_suite.cypress/e2e/other.cy.js',
798+
'test_suite.cypress/e2e/spec.cy.js',
799+
]
800+
)
798801

799-
assertObjectContains(testSuiteEvents.map(suite => suite.content.meta[TEST_STATUS]), [
800-
'fail',
801-
'pass',
802-
'fail',
803-
'fail',
804-
])
802+
assertObjectContains(
803+
testSuiteEvents.map(suite => suite.content.meta[TEST_STATUS]).sort(),
804+
['fail', 'fail', 'fail', 'pass']
805+
)
805806

806807
testSuiteEvents.forEach(({
807808
content: {
@@ -822,16 +823,10 @@ moduleTypes.forEach(({
822823
assert.ok(metrics[DD_HOST_CPU_COUNT])
823824
})
824825

825-
assertObjectContains(testEvents.map(test => test.content.resource), [
826+
assertObjectContains(testEvents.map(test => test.content.resource).sort(), [
827+
'cypress/e2e/other.cy.js.context passes',
826828
'cypress/e2e/spec.cy.js.context passes',
827829
'cypress/e2e/spec.cy.js.other context fails',
828-
'cypress/e2e/other.cy.js.context passes',
829-
])
830-
831-
assertObjectContains(testEvents.map(test => test.content.meta[TEST_STATUS]), [
832-
'pass',
833-
'fail',
834-
'pass',
835830
])
836831

837832
testEvents.forEach(({

0 commit comments

Comments
 (0)