Skip to content

Commit da632cb

Browse files
committed
test(pom): defined an expectation for the pom to exist
1 parent 053fd93 commit da632cb

File tree

6 files changed

+60
-7
lines changed

6 files changed

+60
-7
lines changed

.gitignore

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
2-
3-
4-
51
/node_modules/
62
/lib/
73
/coverage/
84

9-
.eslintcache
5+
.eslintcache

package-lock.json

+45-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"devDependencies": {
5252
"@cucumber/cucumber": "10.3.1",
5353
"@form8ion/commitlint-config": "1.0.68",
54+
"@form8ion/core": "4.2.0",
5455
"@form8ion/eslint-config": "7.0.8",
5556
"@form8ion/eslint-config-cucumber": "1.4.1",
5657
"@form8ion/remark-lint-preset": "6.0.2",
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
Feature: Scaffolder
22

3+
@wip
34
Scenario: Scaffold
45
When the project is scaffolded
6+
Then the pom file is created

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ Before(async function () {
1616
stubbedFs({
1717
node_modules: stubbedNodeModules
1818
});
19+
20+
this.projectRoot = process.cwd();
1921
});
2022

2123
After(function () {
2224
stubbedFs.restore();
2325
});
2426

2527
When('the project is scaffolded', async function () {
26-
await scaffold({projectRoot: process.cwd()});
28+
await scaffold({projectRoot: this.projectRoot});
2729
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import {fileExists} from '@form8ion/core';
2+
3+
import {Then} from '@cucumber/cucumber';
4+
import {assert} from 'chai';
5+
6+
Then('the pom file is created', async function () {
7+
assert.isTrue(await fileExists(`${this.projectRoot}/pom.xml`));
8+
});

0 commit comments

Comments
 (0)