V6μμλ μλ리μ€λ₯Ό 건λλ°κΈ° μν΄ Before each μλλ¦¬μ€ νν¬λ₯Ό μ¬μ©νμ΅λλ€.
Before({ tags: '<strong i="6">@ignore</strong>' }, async function () {
return 'skipped';
});
μ΄ λμΌν μ½λλ typescriptλ₯Ό μ¬μ©νλ v7μμ λ μ΄μ μ»΄νμΌλμ§ μμ΅λλ€.
error TS2769: No overload matches this call.
Overload 1 of 3, '(tags: string, code: TestCaseHookFunction): void', gave the following error.
Argument of type '{ tags: string; }' is not assignable to parameter of type 'string'.
Overload 2 of 3, '(options: IDefineTestCaseHookOptions, code: TestCaseHookFunction): void', gave the following error.
Argument of type '(this: CustomWorld) => Promise<string>' is not assignable to parameter of type 'TestCaseHookFunction'.
Type '(this: CustomWorld) => Promise<string>' is not assignable to type 'TestCaseHookFunctionWithoutParameter'.
Type 'Promise<string>' is not assignable to type 'void | Promise<void>'.
Type 'Promise<string>' is not assignable to type 'Promise<void>'.
v7μμ μλ리μ€λ₯Ό 건λλ°λ μ¬λ°λ₯Έ λ°©λ²μ 무μμ λκΉ?
κ°μ¬ ν΄μ
Serenity/JS μ Cucumber v7μ λν μ§μμ μΆκ°νλ λμ λκ°μ λ¬Έμ κ° λ°μνμ΅λλ€.
v6μμ μ¬μ©νλ κ²κ³Ό λκ°μ λ°©μμΌλ‘ μλνλ μ€μ κΈ°λ₯보λ€λ μ ν μ μμ λ¬Έμ μΈ κ² κ°μ΅λλ€.
@charlierudolph / @davidjgoss , μλ μ μκ°μ΄ λ§λμ§ νμΈν΄ μ£Όμκ² μ΅λκΉ?
support_code_library_builder/types.ts
μλ λ€μκ³Ό κ°μ μ μκ° μμ΅λλ€.
export type TestCaseHookFunctionWithoutParameter = () => void | Promise<void>
export type TestCaseHookFunctionWithParameter = (
arg: ITestCaseHookParameter
) => void | Promise<void>
Cucumberλ νν¬κ° void
, string
of 'skipped'
λλ 'pending'
λλ ν΄λΉ κ²°κ³Ό μ€ νλλ₯Ό ν¬ν¨νλ Promise
λ₯Ό λ°ννλλ‘ νμ©ν©λλ€. , κ°μ λ ꡬνμ λ€μκ³Ό κ°μ΄ λ³΄μΌ μ μμ΅λλ€.
export type TestCaseHookFunctionResult = 'skipped' | 'pending' | void
export type TestCaseHookFunctionWithoutParameter = () => TestCaseHookFunctionResult | Promise<TestCaseHookFunctionResult>
export type TestCaseHookFunctionWithParameter = (
arg: ITestCaseHookParameter
) => TestCaseHookFunctionResult | Promise<TestCaseHookFunctionResult>
μ΄μ μ μ¬ν λ³κ²½ μ¬νμ΄ λμ λ λκΉμ§ μ΄ λ¬Έμ μ λν ν΄κ²° λ°©λ²μ λ€μκ³Ό κ°μ΄ ν μ€νΈ νν¬λ₯Ό μ§μ νλ κ²μ λλ€.
import { Before } from '@cucumber/cucumber';
Before({ tags: '<strong i="25">@ignore</strong>' }, function () {
return 'skipped' as any;
});
μλ νμΈμ @jan-molakλ, νΌλλ°± μ£Όμ μ κ°μ¬ν©λλ€. ν΄κ²° λ°©λ²μ΄ μλ²½νκ² μλν©λλ€!
@jan-molak ν΄κ²° λ°©λ²μ κ°μ¬λ립λλ€. 곧 μ΄ λ¬Έμ λ₯Ό μ΄ν΄λ³΄κ² μ΅λλ€.
κ°μ₯ μ μ©ν λκΈ
Serenity/JS μ Cucumber v7μ λν μ§μμ μΆκ°νλ λμ λκ°μ λ¬Έμ κ° λ°μνμ΅λλ€.
v6μμ μ¬μ©νλ κ²κ³Ό λκ°μ λ°©μμΌλ‘ μλνλ μ€μ κΈ°λ₯보λ€λ μ ν μ μμ λ¬Έμ μΈ κ² κ°μ΅λλ€.
@charlierudolph / @davidjgoss , μλ μ μκ°μ΄ λ§λμ§ νμΈν΄ μ£Όμκ² μ΅λκΉ?
support_code_library_builder/types.ts
μλ λ€μκ³Ό κ°μ μ μκ° μμ΅λλ€.Cucumberλ νν¬κ°
void
,string
of'skipped'
λλ'pending'
λλ ν΄λΉ κ²°κ³Ό μ€ νλλ₯Ό ν¬ν¨νλPromise
λ₯Ό λ°ννλλ‘ νμ©ν©λλ€. , κ°μ λ ꡬνμ λ€μκ³Ό κ°μ΄ λ³΄μΌ μ μμ΅λλ€.μ΄μ μ μ¬ν λ³κ²½ μ¬νμ΄ λμ λ λκΉμ§ μ΄ λ¬Έμ μ λν ν΄κ²° λ°©λ²μ λ€μκ³Ό κ°μ΄ ν μ€νΈ νν¬λ₯Ό μ§μ νλ κ²μ λλ€.