Move tests to using package test
diff --git a/pubspec.yaml b/pubspec.yaml
index fa602b7..7e79da2 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -6,4 +6,4 @@
environment:
sdk: '>=1.0.0 <2.0.0'
dev_dependencies:
- unittest: ">=0.9.0 <0.13.0"
+ test: ^0.12.0
diff --git a/test/mustache_specs.dart b/test/mustache_specs.dart
index 1cc52c3..a41317f 100644
--- a/test/mustache_specs.dart
+++ b/test/mustache_specs.dart
@@ -5,10 +5,11 @@
library mustache_specs;
-import 'dart:io';
import 'dart:convert';
-import 'package:unittest/unittest.dart';
+import 'dart:io';
+
import 'package:mustache/mustache.dart';
+import 'package:test/test.dart';
String render(source, values, {partial}) {
var resolver = null;
diff --git a/test/mustache_test.dart b/test/mustache_test.dart
index 1cce794..2e92d0d 100644
--- a/test/mustache_test.dart
+++ b/test/mustache_test.dart
@@ -1,7 +1,7 @@
library mustache_test;
-import 'package:unittest/unittest.dart';
import 'package:mustache/mustache.dart';
+import 'package:test/test.dart';
const MISMATCHED_TAG = 'Mismatched tag';
const UNEXPECTED_EOF = 'Unexpected end of input';
@@ -396,16 +396,18 @@
group('Lenient', () {
test('Odd section name', () {
- var output = parse(r'{{#section$%$^%}}_{{var}}_{{/section$%$^%}}',
- lenient: true).renderString({
+ var output =
+ parse(r'{{#section$%$^%}}_{{var}}_{{/section$%$^%}}', lenient: true)
+ .renderString({
r'section$%$^%': {'var': 'bob'}
});
expect(output, equals('_bob_'));
});
test('Odd variable name', () {
- var output = parse(r'{{#section}}_{{var$%$^%}}_{{/section}}',
- lenient: true).renderString({
+ var output =
+ parse(r'{{#section}}_{{var$%$^%}}_{{/section}}', lenient: true)
+ .renderString({
'section': {r'var$%$^%': 'bob'}
});
expect(output, equals('_bob_'));
@@ -549,12 +551,12 @@
});
//FIXME
- skip_test('inverted sections truthy', () {
+ test('inverted sections truthy', () {
var template = '<{{^lambda}}{{static}}{{/lambda}}>';
var values = {'lambda': (_) => false, 'static': 'static'};
var output = '<>';
expect(parse(template).renderString(values), equals(output));
- });
+ }, skip: "skip test");
test("seth's use case", () {
var template = '<{{#markdown}}{{content}}{{/markdown}}>';
diff --git a/test/parser_test.dart b/test/parser_test.dart
index f5ff57f..b9ef19e 100644
--- a/test/parser_test.dart
+++ b/test/parser_test.dart
@@ -1,10 +1,9 @@
-import 'package:unittest/unittest.dart';
-
import 'package:mustache/src/node.dart';
import 'package:mustache/src/parser.dart';
import 'package:mustache/src/scanner.dart';
import 'package:mustache/src/template_exception.dart';
import 'package:mustache/src/token.dart';
+import 'package:test/test.dart';
main() {
group('Scanner', () {
@@ -235,7 +234,9 @@
var source = 'abc\n ';
var parser = new Parser(source, 'foo', '{{ }}', lenient: false);
var nodes = parser.parse();
- expectNodes(nodes, [new TextNode('abc\n ', 0, 7),]);
+ expectNodes(nodes, [
+ new TextNode('abc\n ', 0, 7),
+ ]);
});
test('parse partial', () {