- hackmd version: https://hackmd.io/1eeNAS1oQuSvMA0q6y_QuA?view
 - gist version: https://gist.github.com/bluet/23e7697b86144561c4a3d804903d059d
 
[TOC]
- Extract 部份:取出要的資料、去雜訊、資料標準化、parsing...
 - Transform:aggregation、mapping 、combined、Change Data Types
 
[TOC]
| // features/step_definitions/cal.step.js | |
| import { Given, When, Then } from "cucumber" | |
| import * as chai from "chai" | |
| chai.should() | |
| Given('the first number is {int}', function (first) { | |
| // Write code here that turns the phrase above into concrete actions | |
| this.first = first | |
| }) | 
| #language: zh-TW | |
| 功能: 計算機 | |
| 進行加減乘除四則運算 | |
| 場景: 1 加 2 會等於 3 | |
| 假設 第一個數字是 1 | |
| 並且 第二個數字是 2 | |
| 當 兩者相加 | |
| 那麼 結果會是 3 | 
| function add(x, y) { | |
| return x + y | |
| } | |
| function minus(x, y) { | |
| return x - y | |
| } | |
| export { | |
| add, | 
| import * as assert from 'assert' | |
| describe('add function', function () { | |
| it('add(1, 2) = 3', function () { | |
| assert.deepStrictEqual(add(1, 2), 3) | |
| }) | |
| it('add(1, -2) = -1', function () { | |
| assert.deepStrictEqual(add(1, -2), -1) | |
| }) |