Skip to content

[test] ignore deprecated pkg:js (for now) #2458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading