-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(integration): backfilled coverage for creation of the editorconf…
…ig file for #1275
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
23
test/integration/features/step_definitions/config-steps.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
` | ||
); | ||
}); |