Skip to content

Commit

Permalink
requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MelSumner committed May 7, 2021
1 parent b973e69 commit 1557559
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions test/acceptance/todo-cli-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,11 @@ describe('todo usage', () => {
},
});

// run normally and expect an error for not running --clean-todo
// run normally and expect the issue to be back in the error state and there to be no todo
let result = await run(['.']);

let todoDirs = fs.readdirSync(getTodoStorageDirPath(project.baseDir));

expect(result.exitCode).toEqual(1);
expect(result.stdout).toMatchInlineSnapshot(`
"app/templates/require-button-type.hbs
Expand All @@ -378,23 +380,6 @@ describe('todo usage', () => {
✖ 1 problems (1 errors, 0 warnings)
1 errors and 0 warnings potentially fixable with the \`--fix\` option."
`);

// run clean-todo, and expect that this will delete the expired todo item
await run(['app/templates/require-button-type.hbs', '--clean-todo']);

// run normally again and expect only the error
result = await run(['.']);

let todoDirs = fs.readdirSync(getTodoStorageDirPath(project.baseDir));

expect(result.exitCode).toEqual(1);
expect(result.stdout).toMatchInlineSnapshot(`
"app/templates/require-button-type.hbs
1:0 error All \`<button>\` elements should have a valid \`type\` attribute require-button-type
✖ 1 problems (1 errors, 0 warnings)
1 errors and 0 warnings potentially fixable with the \`--fix\` option."
`);
expect(todoDirs).toHaveLength(0);
});

Expand Down

0 comments on commit 1557559

Please sign in to comment.