Cucumber-js: ์—ฌ๋Ÿฌ ๋‹จ๊ณ„ ํŒŒ์ผ๋กœ ์˜ค์ด๋ฅผ ์‹คํ–‰ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

์— ๋งŒ๋“  2018๋…„ 02์›” 12์ผ  ยท  3์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: cucumber/cucumber-js

๋‚˜๋Š” ์—ฌ๋Ÿฌ ๋‹จ๊ณ„ ํŒŒ์ผ๊ณผ ํ•จ๊ป˜ ์˜ค์ด๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๊ณ  ์‹œ๋„ํ–ˆ์ง€๋งŒ ์•„๋ฌด ์†Œ์šฉ์ด ์—†์Šต๋‹ˆ๋‹ค. ๋‹ค์Œ ๋ช…๋ น๊ณผ ํ•จ๊ป˜ 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

๊ธ€๋กœ๋ธŒ ์ฃผ์œ„์˜ ๋”ฐ์˜ดํ‘œ๋Š” ์…ธ์—์„œ ํ™•์žฅ๋˜๋Š” ๊ฒƒ์„ ๋ฐฉ์ง€ํ•ฉ๋‹ˆ๋‹ค.

๋ชจ๋“  3 ๋Œ“๊ธ€

๋„ˆ ์‹œ๋„ ํ•  ์ˆ˜์žˆ์–ด

./node_modules/.bin/cucumber-js src --require 'src/steps/*.steps.ts' --require-module ts-node/register

๊ธ€๋กœ๋ธŒ ์ฃผ์œ„์˜ ๋”ฐ์˜ดํ‘œ๋Š” ์…ธ์—์„œ ํ™•์žฅ๋˜๋Š” ๊ฒƒ์„ ๋ฐฉ์ง€ํ•ฉ๋‹ˆ๋‹ค.

@charlierudolph ๋†€๋ผ์šด ์ผ์ด์—ˆ์Šต๋‹ˆ๋‹ค :) ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.

์ด ์Šค๋ ˆ๋“œ๋Š” ๋‹ซํžŒ ํ›„ ์ตœ๊ทผ ํ™œ๋™์ด ์—†์—ˆ๊ธฐ ๋•Œ๋ฌธ์— ์ž๋™์œผ๋กœ ์ž ๊ฒผ์Šต๋‹ˆ๋‹ค. ๊ด€๋ จ ๋ฒ„๊ทธ์— ๋Œ€ํ•œ ์ƒˆ ๋ฌธ์ œ๋ฅผ ์—ฌ์‹ญ์‹œ์˜ค.

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰