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

test: mv assert to fixtures #3829

Merged
merged 3 commits into from
Jul 22, 2019
Merged

test: mv assert to fixtures #3829

merged 3 commits into from
Jul 22, 2019

Conversation

thonatos
Copy link
Member

@thonatos thonatos commented Jul 18, 2019

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

由于 dumpConfigapp.ready() 前后各一次,且创建时间无法确定,通过 sleep 方法检测在 win 存在不确定性,将其移动到 fixturesapp.js 中使用文件读取的方式进行检测。

@codecov
Copy link

codecov bot commented Jul 18, 2019

Codecov Report

Merging #3829 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #3829   +/-   ##
======================================
  Coverage     100%    100%           
======================================
  Files          34      34           
  Lines         945     945           
======================================
  Hits          945     945

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6bfc0eb...e65ff6f. Read the comment docs.

@thonatos thonatos changed the title test: extend duration in dynamically dumpConfig [WIP] test: extend duration in dynamically dumpConfig Jul 18, 2019
@thonatos thonatos force-pushed the test/fix-win-ci branch 3 times, most recently from ad27040 to 3d6ea5a Compare July 18, 2019 08:47
@thonatos thonatos changed the title [WIP] test: extend duration in dynamically dumpConfig [WIP] test: update 'dumpConfig() dynamically' test case Jul 18, 2019
@thonatos thonatos changed the title [WIP] test: update 'dumpConfig() dynamically' test case test: update 'dumpConfig() dynamically' test case Jul 18, 2019
@@ -168,15 +168,8 @@ describe('test/lib/egg.test.js', () => {
const baseDir = utils.getFilepath('apps/dumpconfig');
let json;

await sleep(100);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里不能删掉吧,dump config 会执行两次的,这里是分别在 ready 前后校验

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

改了,移动到 fixturesapp.js 里了,这样就不用担心读取时机不对了,老板霸气~

@thonatos thonatos changed the title test: update 'dumpConfig() dynamically' test case test: mv assert to fixtures Jul 19, 2019
test/fixtures/apps/dumpconfig/app.js Outdated Show resolved Hide resolved
test/fixtures/apps/dumpconfig/app.js Outdated Show resolved Hide resolved
test/fixtures/apps/dumpconfig/app.js Outdated Show resolved Hide resolved
@atian25 atian25 merged commit 341beda into master Jul 22, 2019
popomore pushed a commit that referenced this pull request Jul 22, 2019
test: mv assert to fixtures (#3829)
@atian25 atian25 deleted the test/fix-win-ci branch July 22, 2019 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants