pxt-ev3/tests/touch.ts

7 lines
276 B
TypeScript
Raw Normal View History

2017-12-19 23:55:48 +01:00
tests.test("Touch sensor pressed", function () {
brick.print("Press touch sensor", 0, 50)
brick.print("and click enter", 0, 60)
brick.buttonEnter.pauseUntil(ButtonEvent.Click)
brick.clearScreen()
tests.assert("Pressed", sensors.touchSensor1.isPressed())
})