@TestOn('browser') import 'package:rules_of_living/src/Engine.dart'; import 'package:test/test.dart'; void main() { test("Engine can be instantiated without canvas", () { expect(Engine(), isNot(throwsNoSuchMethodError)); }); test("Engine does not throw errors when calling render directly", () { Engine sut = new Engine(); // anonymous function necessary since throws can not use functions with args expect(() => sut.render(), isNot(throwsNoSuchMethodError)); }); test("Engine does not throw errors when processing without attached canvas", () { Engine sut = new Engine(); // anonymous function necessary since throws can not use functions with args expect(() => sut.process(1000), isNot(throwsNoSuchMethodError)); }); }