๋๋ ์ฌ๋ฌ ๋จ๊ณ ํ์ผ๊ณผ ํจ๊ป ์ค์ด๋ฅผ ์ฌ์ฉํ๋ ค๊ณ ์๋ํ์ง๋ง ์๋ฌด ์์ฉ์ด ์์ต๋๋ค. ๋ค์ ๋ช ๋ น๊ณผ ํจ๊ป typescript ๋จ๊ณ ์ ์๋ฅผ ์ฌ์ฉํ๊ณ ์์ต๋๋ค.
./node_modules/.bin/cucumber-js src --require src/steps/*.steps.ts --require-module ts-node/register
๊ทธ๋ฌ๋ ์ค๋ฅ๊ฐ ๋ํ๋ฉ๋๋ค.
์ค๋ฅ: (1:1): ์์: #EOF, #Language, #TagLine, #FeatureLine, #Comment, #Empty, 'cucumber'์์ { CallbackStepDefinition as CB, Given, When, Then } ๊ฐ์ ธ์ค๊ธฐ๋ฅผ ๊ฐ์ ธ์์ต๋๋ค.'
๋๋ program.parse(args) ๋ค์์ lib/cli/argv_parser.js ์ console.log ๋ฅผ ๋ฃ์์ต๋๋ค.
[ 'src', 'src/steps/example2.steps.ts' ]
๋ถ๋ช ํ ๋ ๋ฒ์งธ ๋จ๊ณ ํ์ผ์ด ๊ธฐ๋ฅ ํ์ผ๋ก ์๋ชป ๊ณต๊ธ๋์์ต๋๋ค.
๋๋ ์ฌ๊ธฐ์ ์ต์ํ์ผ๋ก ์ฌํ ๊ฐ๋ฅํ ์ ์ฅ์๋ฅผ ํฌํจํ์ต๋๋ค: https://github.com/protoman92/cucumber-lightweight-sample .
๋ ์๋ ํ ์์์ด
./node_modules/.bin/cucumber-js src --require 'src/steps/*.steps.ts' --require-module ts-node/register
๊ธ๋ก๋ธ ์ฃผ์์ ๋ฐ์ดํ๋ ์ ธ์์ ํ์ฅ๋๋ ๊ฒ์ ๋ฐฉ์งํฉ๋๋ค.
@charlierudolph ๋๋ผ์ด ์ผ์ด์์ต๋๋ค :) ๊ฐ์ฌํฉ๋๋ค.
์ด ์ค๋ ๋๋ ๋ซํ ํ ์ต๊ทผ ํ๋์ด ์์๊ธฐ ๋๋ฌธ์ ์๋์ผ๋ก ์ ๊ฒผ์ต๋๋ค. ๊ด๋ จ ๋ฒ๊ทธ์ ๋ํ ์ ๋ฌธ์ ๋ฅผ ์ฌ์ญ์์ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
๋ ์๋ ํ ์์์ด
๊ธ๋ก๋ธ ์ฃผ์์ ๋ฐ์ดํ๋ ์ ธ์์ ํ์ฅ๋๋ ๊ฒ์ ๋ฐฉ์งํฉ๋๋ค.