Skip to content

Commit b06db02

Browse files
committed
feat: defined the dependency on prettier
closes #3
1 parent 20d932c commit b06db02

File tree

6 files changed

+22
-9
lines changed

6 files changed

+22
-9
lines changed

src/canary-test.js

-7
This file was deleted.

src/scaffolder-test.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import {assert} from 'chai';
2+
3+
import scaffold from './scaffolder';
4+
5+
suite('scaffolder', () => {
6+
test('that prettier is scaffolded', async () => {
7+
const {devDependencies} = await scaffold();
8+
9+
assert.deepEqual(devDependencies, ['prettier']);
10+
});
11+
});

src/scaffolder.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export default function () {
2-
return undefined;
2+
return {devDependencies: ['prettier']};
33
}

test/integration/features/scaffolder.feature

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ Feature: Scaffolder
22

33
Scenario: Scaffold
44
When the project is scaffolded
5+
Then the dependencies are defined

test/integration/features/step_definitions/common-steps.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ When('the project is scaffolded', async function () {
1919
node_modules: stubbedNodeModules
2020
});
2121

22-
await scaffold({projectRoot: process.cwd()});
22+
this.scaffoldResult = await scaffold({projectRoot: process.cwd()});
2323
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import {Then} from '@cucumber/cucumber';
2+
import {assert} from 'chai';
3+
4+
Then('the dependencies are defined', async function () {
5+
const {devDependencies} = this.scaffoldResult;
6+
7+
assert.include(devDependencies, 'prettier');
8+
});

0 commit comments

Comments
 (0)