Skip to content

Commit e65d483

Browse files
committed
test(integration): verify compatibility with form8ion expectations
1 parent fe4d5e9 commit e65d483

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Feature: mocha as form8ion plugin
2+
3+
Scenario: plugin conventions
4+
When the project is scaffolded
5+
Then the public interface is compatible with the plugin schema
6+
And the output produced by the scaffolder is detectable by the predicate
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import {validateOptions, optionsSchemas} from '@form8ion/core';
2+
3+
import assert from 'node:assert';
4+
import {Then} from '@cucumber/cucumber';
5+
6+
// eslint-disable-next-line import/no-extraneous-dependencies,import/no-unresolved
7+
import * as plugin from '@form8ion/mocha-scaffolder';
8+
9+
Then('the public interface is compatible with the plugin schema', async function () {
10+
validateOptions(optionsSchemas.form8ionPlugin, plugin);
11+
});
12+
13+
Then('the output produced by the scaffolder is detectable by the predicate', async function () {
14+
assert.equal(await plugin.test({projectRoot: this.projectRoot}), true);
15+
});

0 commit comments

Comments
 (0)