Skip to content

Commit

Permalink
test(integration): backfilled coverage for creation of the editorconf…
Browse files Browse the repository at this point in the history
…ig file

for #1275
  • Loading branch information
travi committed Jul 1, 2023
1 parent 0e2ecd4 commit c8fada7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/integration/features/scaffold.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Feature: Scaffold

Scenario: simple project
When the project is scaffolded
Then basic configuration is added
23 changes: 23 additions & 0 deletions test/integration/features/step_definitions/config-steps.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import {promises as fs} from 'fs';

import {Then} from '@cucumber/cucumber';
import {assert} from 'chai';

Then('basic configuration is added', async function () {
assert.equal(
await fs.readFile(`${process.cwd()}/.editorconfig`, 'utf-8'),
`# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
charset = utf-8
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
`
);
});

0 comments on commit c8fada7

Please sign in to comment.