I am trying to create a unit test that requires us to falsify the Element class
So my code looks something like this:
import 'dart:html';
import 'package:unittest/unittest.dart';
import 'package:mock/mock.dart';
@proxy
class MockElement extends Mock implements Element{}
void main(){
test("",(){
MockView view = new MockView();
MockElement element = new MockElement();
When I run this, I get the following message
The dart: html built-in library is not available on stand-alone VMs. 'File: /// C: /Users/Schmidt/Documents/GitHub/PicasaWebAlbumDisplay/test/picasaphotopresentor_test.dart': error: line 1 pos 1: library handler could not import 'dart: html'; ^
I need to import html to define the Element class, so I'm stuck at this point.
Any ideas?
source
share