Index: test/codegen/expect/unittest/unittest.js |
diff --git a/test/codegen/expect/unittest/unittest.js b/test/codegen/expect/unittest/unittest.js |
index 3e7a0f3a5af110a854b2e8813a5460b6887a3fce..ed94da97e04a327490076bede42017008e428701 100644 |
--- a/test/codegen/expect/unittest/unittest.js |
+++ b/test/codegen/expect/unittest/unittest.js |
@@ -16,8 +16,7 @@ dart_library.library('unittest/unittest', null, /* Imports */[ |
return dart.dsend(dom.window, 'suite', name, body); |
} |
dart.fn(group, dart.void, [core.String, dart.functionType(dart.void, [])]); |
- function test(name, body, opts) { |
- let skip = opts && 'skip' in opts ? opts.skip : null; |
+ function test(name, body, {skip = null} = {}) { |
if (skip != null) { |
core.print(`SKIP ${name}: ${skip}`); |
return; |
@@ -47,10 +46,7 @@ dart_library.library('unittest/unittest', null, /* Imports */[ |
constructors: () => ({TestFailure: [TestFailure, [core.String]]}) |
}); |
const ErrorFormatter = dart.typedef('ErrorFormatter', () => dart.functionType(core.String, [dart.dynamic, interfaces.Matcher, core.String, core.Map, core.bool])); |
- function expect(actual, matcher, opts) { |
- let reason = opts && 'reason' in opts ? opts.reason : null; |
- let verbose = opts && 'verbose' in opts ? opts.verbose : false; |
- let formatter = opts && 'formatter' in opts ? opts.formatter : null; |
+ function expect(actual, matcher, {reason = null, verbose = false, formatter = null} = {}) { |
matcher = util.wrapMatcher(matcher); |
let matchState = dart.map(); |
try { |