Skip to content

Commit

Permalink
Move parameter spec implementation
Browse files Browse the repository at this point in the history
Signed-off-by: Zabil Cheriya Maliackal <[email protected]>
  • Loading branch information
zabil committed Jul 1, 2024
1 parent fc99cce commit 5c752a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 0 additions & 8 deletions e2e/tests/implementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import * as assert from "node:assert";
import VowelCounter from "@lib/VowelCounter";
import { DataStoreFactory, Step, type Table } from "gauge-ts";

import type { Person } from "@lib/Person";

export default class Implementation {
static vowelsCount = (word: string): number => {
const counter = DataStoreFactory.getSpecDataStore().get(
Expand Down Expand Up @@ -36,10 +34,4 @@ export default class Implementation {
);
}
}
@Step("This step uses a custom parameter of type Person and value <person>")
public async validatePerson(person: Person) {
assert.strictEqual(person.name, "John");
assert.strictEqual(person.age, 30);
assert.ok(person.isAdult());
}
}
8 changes: 8 additions & 0 deletions e2e/tests/parameter.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
import * as assert from "node:assert";
import type { Person } from "@lib/Person";
import { Step } from "gauge-ts";

export default class Parameter {
@Step("Trimmed <original> is the same as <expected>")
public async checkTrimmedWord(original: string, expected: string) {
assert.strictEqual(original.trim(), expected);
}

@Step("This step uses a custom parameter of type Person and value <person>")
public async validatePerson(person: Person) {
assert.strictEqual(person.name, "John");
assert.strictEqual(person.age, 30);
assert.ok(person.isAdult());
}
}

0 comments on commit 5c752a1

Please sign in to comment.