UNPKG

@craftapit/tester

Version:

A focused, LLM-powered testing framework for natural language test scenarios

47 lines (38 loc) 1.15 kB
// Test scenario: Calculator Test // Steps: // GIVEN: a new Calculator instance with initial value 10 // WHEN: I add 5 to the calculator // THEN: the result should be 15 // WHEN: I subtract 3 from the calculator // THEN: the result should be 12 // WHEN: I multiply the calculator by 2 // THEN: the result should be 24 // WHEN: I divide the calculator by 4 // THEN: the result should be 6 import { add, subtract, Calculator } from './implementation'; describe('Calculator', () => { it('should be defined', () => { expect(Calculator).toBeDefined(); }); // TODO: Add more specific tests for Calculator }); describe('add', () => { it('should be defined', () => { expect(add).toBeDefined(); }); it('should return the expected result', () => { // TODO: Implement test // const result = add(); // expect(result).toEqual(expectedValue); }); }); describe('subtract', () => { it('should be defined', () => { expect(subtract).toBeDefined(); }); it('should return the expected result', () => { // TODO: Implement test // const result = subtract(); // expect(result).toEqual(expectedValue); }); });