Skip to content

Commit 3135bd2

Browse files
author
DavertMik
committed
fixed styles in failing tests
1 parent 9075ba8 commit 3135bd2

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

test/runner/pageobject_test.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
const path = require('path')
22
const exec = require('child_process').exec
33
const { expect } = require('expect')
4-
4+
const figures = require('figures')
5+
const debug = require('debug')('codeceptjs:test')
56
const runner = path.join(__dirname, '/../../bin/codecept.js')
67
const codecept_dir = path.join(__dirname, '/../data/sandbox/configs/pageObjects')
78
const codecept_run = `${runner} run`
@@ -16,13 +17,14 @@ describe('CodeceptJS PageObject', () => {
1617
it('should fail if page objects was failed', done => {
1718
exec(`${config_run_config('codecept.fail_po.js')} --debug`, (err, stdout) => {
1819
const lines = stdout.split('\n')
20+
debug(stdout)
1921
expect(lines).toEqual(
2022
expect.arrayContaining([
2123
expect.stringContaining('File notexistfile.js not found in'),
2224
expect.stringContaining('-- FAILURES'),
23-
expect.stringContaining('- I.seeFile("notexistfile.js")'),
24-
expect.stringContaining('- I.seeFile("codecept.class.js")'),
25-
expect.stringContaining('- I.amInPath(".")'),
25+
expect.stringContaining(figures.cross + ' I.seeFile("notexistfile.js")'),
26+
expect.stringContaining(figures.tick + ' I.seeFile("codecept.class.js")'),
27+
expect.stringContaining(figures.tick + ' I.amInPath(".")'),
2628
]),
2729
)
2830
expect(stdout).toContain('FAIL | 0 passed, 1 failed')

test/runner/step_timeout_test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const { expect } = require('expect')
22
const exec = require('child_process').exec
33
const { codecept_dir, codecept_run } = require('./consts')
4-
4+
const figures = require('figures')
55
const debug_this_test = false
66

77
const config_run_config = (config, grep, verbose = false) => `${codecept_run} ${verbose || debug_this_test ? '--verbose' : ''} --config ${codecept_dir}/configs/step_timeout/${config} ${grep ? `--grep "${grep}"` : ''}`
@@ -13,7 +13,7 @@ describe('CodeceptJS Steps', function () {
1313
exec(config_run_config('codecept-1000.conf.js', 'Default command timeout'), (err, stdout) => {
1414
expect(stdout).toContain('Action exceededByTimeout: 1500 was interrupted on step timeout 1000ms')
1515
expect(stdout).toContain('0 passed, 1 failed')
16-
expect(stdout).toContain('- I.exceededByTimeout(1500)')
16+
expect(stdout).toContain(figures.cross + ' I.exceededByTimeout(1500)')
1717
expect(err).toBeTruthy()
1818
done()
1919
})

0 commit comments

Comments
 (0)