Skip to content

Commit

Permalink
test(intg): prepare testing for evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
lemredd committed Dec 20, 2022
1 parent 904d91e commit ef0a836
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/components/CalculatorContainer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,6 @@ import Component from "./CalculatorContainer.vue"

describe("Component: CalculatorContainer", () => {
it("can change screen value once a button is pressed", async() => {
const wrapper = mount(Component)
const digitalBtn = wrapper.find(".digital-button")
const calculatorScreen = wrapper.find(".calculator-screen").element as HTMLInputElement

await digitalBtn.trigger("click")
expect(calculatorScreen.value).not.toEqual("0")
})

it("can evaluate simple expression", async() => {
const wrapper = mount(Component)
const calculatorScreen = wrapper.find(".calculator-screen").element as HTMLInputElement

Expand All @@ -38,4 +29,6 @@ describe("Component: CalculatorContainer", () => {
await equalBtn.trigger("click")
expect(calculatorScreen.value).toEqual("1 + 1 =")
})

it.todo("can evaluate a formed expression")
})

0 comments on commit ef0a836

Please sign in to comment.