airjp73 / vitest-act-reproduction

0 stars 0 forks source link

Robobun test #1

Open airjp73 opened 1 year ago

airjp73 commented 1 year ago

@robobun

import { roll } from '@airjp73/dice-notation';

console.log(roll('1d6 + 3'));
robobun commented 1 year ago

@airjp73 here you go!

{ tokens: [ { type: "DiceRoll", content: "1d6", position: 0, detailType: "_SimpleDieRoll", detail: { count: 1, numSides: 6 } }, { type: "Operator", position: 4, content: "+", operator: "+" }, { type: "DiceRoll", content: "3", position: 6, detailType: "_Constant", detail: 3 } ], rolls: [ [ 5 ], null, [] ], rollTotals: [ 5, null, 3 ], result: 8 }
Code ```tsx import { roll } from '@airjp73/dice-notation'; console.log(roll('1d6 + 3')); ```

Ran using the latest build of Bun, an all-in-one JavaScript runtime.

airjp73 commented 1 year ago

@robobun

import { roll } from '@airjp73/dice-notation';

console.log(roll('1d6 + 3').result);
robobun commented 1 year ago

@airjp73 here you go!

5
Code ```tsx import { roll } from '@airjp73/dice-notation'; console.log(roll('1d6 + 3').result); ```

Ran using the latest build of Bun, an all-in-one JavaScript runtime.