title: browser won't run unit test script
body: <p>Getting started with Dart. Built the bare bones app which has no built-in test functionality, so as a learning exercise I'm trying to add unit testing via a browser with a view to testing html elements. I've only found Dart v1 examples which I have been unable to convert, nor discovered any docs which explain the upgrade path.</p>
  
  <p>I've tried under VSCODE and IDEA</p>
  
  <p>I create a  directory and insert a simple html </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;Title&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;!--&lt;script src="packages/test/test.js"&gt;&lt;/script&gt;--&gt;
  &lt;script type="application/dart" src="test.dart"&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>in the same directory a simple test...</p>
  
  <pre><code>// @TestOn('browser')
  // import 'dart:html';
  
  import 'package:test/test.dart';
  void main() {
    test('test to check', () {
      print("starting test 1");
      var expected = 10;
      var actual = 5;
      expect(actual, expected);
    });
  </code></pre>
  
  <p>I then built with >><code>webdev serve</code></p>
  
  <p>I have spent ages on in and trialed-and-errored a thousand combinations, but all I get on localhost:8081 is </p>
  
  <blockquote>
    <blockquote>
      <p>No tests found!</p>
    </blockquote>
  </blockquote>
  
  <p>and no console output, so the test script isn't being run.</p>
  
  <p>In my yaml I have tried to add every dependency going - at the moment it's</p>
  
  <pre><code>dev_dependencies:
    build_runner: ^1.1.2
    build_web_compilers: ^1.0.0
    pedantic: ^1.0.0
    build_test: ^0.10.3
    test: ^1.5.1
  </code></pre>
  
  <p>obviously there's something fundamental I'm missing.
  Just a skeleton github sample of barebones with (a) working test on 8081 would be perfect to get me started (maybe testing an html element), along with an explanation of where I've gone wrong!</p>
  
  <p>I'd like a working demo (ideally) as I have this nagging doubt that there's something wrong with my setup - I've dart 2.2 on windows and I've uninstalled flutter.</p>
  
  <p><strong>Follow Up:</strong></p>
  
  <p>I had my long formatted "answer" deleted by a moderator. The long and short of it, it didn't work, although an initial script ran.</p>
  
  <p>I tried it on an older, linux machine I have and the tests ran in the console, but dart threw errors too dart:sdk_internal 4537:11 and output a stack trace.</p>
  
  <p>Also, I was trying to format output to the browser window, however unittest package is deprecated, which had html_config.dart and html_enhanced_config.dart libraries to accomplish this. </p>
  
  <p>I've looked but I haven't found any comments on what(if anything) replaced their functionality in dart 2.</p>
  
  <p>It seems no one wants to output unit test results to the browser window!</p>