I have tests that are run according to the operating system using the testOn parameter of the group() and test() functions. These tests are cross-platform: they are launched on the Dart VM but also on the Node.js platform.
For example:
import 'package:test/test.dart';
void main() => group('Class', () {
group('.method()', () {
test('should be run on POSIX platforms', () {
expect(..., ...);
}, testOn: 'posix');
test('should be run on Windows platform', () {
expect(..., ...);
}, testOn: 'windows');
});
});
Currently, when these tests are run on Node.js, all tests using the testOn parameter are ignored by the runner because on Node.js the operating system selectors (i.e. linux, mac-os, windows...) return false.
I wonder if it could be possible that these OS selectors could take the Node.js platform into account, that is return true for the windows selector if the platform is Node.js and the operating system is Windows.
I have tests that are run according to the operating system using the
testOnparameter of thegroup()andtest()functions. These tests are cross-platform: they are launched on the Dart VM but also on the Node.js platform.For example:
Currently, when these tests are run on Node.js, all tests using the
testOnparameter are ignored by the runner because on Node.js the operating system selectors (i.e.linux,mac-os,windows...) returnfalse.I wonder if it could be possible that these OS selectors could take the Node.js platform into account, that is return
truefor thewindowsselector if the platform is Node.js and the operating system is Windows.