diff --git a/src/patterns/state.ts b/src/patterns/state.ts index 66319d5..6e2639b 100644 --- a/src/patterns/state.ts +++ b/src/patterns/state.ts @@ -32,9 +32,10 @@ class Context { } } -export const state = () => { +export const state = (): true => { const context: Context = new Context() context.request() context.setState(new ConcreteStateB()) context.request() + return true } diff --git a/tests/state.test.ts b/tests/state.test.ts new file mode 100644 index 0000000..bfb7ad4 --- /dev/null +++ b/tests/state.test.ts @@ -0,0 +1,8 @@ +import {state} from "../src/patterns" + +describe('KAN_T1_State Test', () => { + it('should return true working with the instance', () => { + const result = state() + expect(result).toBe(true) + }) +})