8000 feat(stats): move part of the logic to the gemini-core by DudaGod · Pull Request #872 · gemini-testing/gemini · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Sep 21, 2022. It is now read-only.

feat(stats): move part of the logic to the gemini-core - #872

Merged
DudaGod merged 2 commits into
masterfrom
dd.use_base_stats
Feb 4, 2018
Merged

DudaGod merged 2 commits into
masterfrom
dd.use_base_stats

Conversation

@DudaGod
@DudaGod DudaGod commented Jan 29, 2018
Copy link
Copy Markdown
Member

No description provided.

@DudaGod
DudaGod force-pushed the dd.use_base_stats branch 3 times, most recently from 6c2dcee to f54b812 Compare January 29, 2018 22:05
Comment thread lib/stats.js Outdated
passed: 'passed',
failed: 'failed',
skipped: 'skipped',
retries: 'retries'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Давай выше определим это, как объект с константами, а здесь напишем this._statNames = statNames.
И кстати, ключи капсом должны быть написаны - это же константы.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

да, это константы, но я бы капсом в этом случае ключи не писал бы. Иначе везде куда летит статистика мне нужно будет дергать название вот так:

const message = [
    `Total: ${chalk.underline(stats.TOTAL)}`,
    `Passed: ${chalk.green(stats.PASSED)}`,
    `Failed: ${chalk.red(stats.FAILED)}`,
    `Skipped: ${chalk.cyan(stats.SKIPPED)}`,
    `Retries: ${chalk.yellow(stats.RETRIES)}`
];

и не забывать, что нужно обязательно их капсом указывать

@DudaGod
DudaGod force-pushed the dd.use_base_stats branch 2 times, most recently from fbe605e to c219493 Compare February 2, 2018 10:11
Comment thread lib/stats.js
failed: 'failed',
skipped: 'skipped',
retries: 'retries'
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ну здесь тоже самое, что и в hermione - я бы все таки ключи капсом назвал.

Comment thread lib/stats.js
constructor() {
this._stats = {};
addUpdated(test) {
return this._addStat(this._statNames.UPDATED, test);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Напомню на всякий случай, либо тут updated, либо в STAT_NAMES все капсом

@DudaGod
DudaGod merged commit 6385889 into master Feb 4, 2018
@DudaGod
DudaGod deleted the dd.use_base_stats branch February 4, 2018 22:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0