Skip to content

Commit

Permalink
[test] ignore deprecated pkg:js (for now) (#2458)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo authored Feb 18, 2025
1 parent 17609bf commit a833663
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 17 deletions.
2 changes: 2 additions & 0 deletions pkgs/test/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 1.25.16-wip

## 1.25.15

* Allow the latest version of `package:shelf_web_socket`.
Expand Down
1 change: 1 addition & 0 deletions pkgs/test/lib/src/runner/browser/dom.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// ignore: deprecated_member_use
import 'dart:js_util' as js_util;

// ignore: deprecated_member_use
import 'package:js/js.dart';

@JS()
Expand Down
2 changes: 1 addition & 1 deletion pkgs/test/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: test
version: 1.25.15
version: 1.25.16-wip
description: >-
A full featured library for writing and running Dart tests across platforms.
repository: https://github.com/dart-lang/test/tree/master/pkgs/test
Expand Down
33 changes: 17 additions & 16 deletions pkgs/test/test/runner/node/runner_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -290,17 +290,17 @@ void main() {
test('forwards raw JS prints from the Node test', () async {
await d.file('test.dart', '''
import 'dart:async';
import 'package:js/js.dart';
import 'dart:js_interop';
import 'package:test/test.dart';
@JS("console.log")
external void log(value);
@JS('console.log')
external void log(JSString value);
void main() {
test("test", () {
log("Hello,");
return Future(() => log("world!"));
test('test', () {
log('Hello,'.toJS);
return Future(() => log('world!'.toJS));
});
}
''').create();
Expand Down Expand Up @@ -339,20 +339,21 @@ void main() {
]).create();

await d.file('test.dart', '''
import 'package:js/js.dart';
import 'dart:js_interop';
import 'package:test/test.dart';
@JS()
external MyModule require(String name);
@JS()
class MyModule {
extension type MyModule(JSObject _) implements JSObject {
external int get value;
}
void main() {
test("can load from a module", () {
expect(require("my_module").value, equals(12));
test('can load from a module', () {
expect(require('my_module').value, equals(12));
});
}
''').create();
Expand Down
1 change: 1 addition & 0 deletions pkgs/test/tool/host.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ library;
import 'dart:async';
import 'dart:convert';

// ignore: deprecated_member_use
import 'package:js/js.dart';
import 'package:stack_trace/stack_trace.dart';
import 'package:stream_channel/stream_channel.dart';
Expand Down

0 comments on commit a833663

Please # to comment.