mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
22 lines
480 B
Dart
22 lines
480 B
Dart
import 'dart:sky';
|
|
|
|
import 'package:test/test.dart';
|
|
|
|
void main() {
|
|
Document document = new Document();
|
|
|
|
test("should throw with invalid arguments", () {
|
|
var parent = document.createElement("div");
|
|
var child = document.createElement("div");
|
|
parent.appendChild(child);
|
|
// TODO(eseidel): This should throw!
|
|
// expect(() {
|
|
// parent.insertBefore([parent]);
|
|
// }, throws);
|
|
expect(() {
|
|
child.insertBefore([parent]);
|
|
}, throws);
|
|
});
|
|
|
|
}
|