Skip to content
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

Add support for OS selectors on Node.js platform #742

Closed
cedx opened this issue Dec 30, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@cedx
Copy link

commented Dec 30, 2017

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.

nex3 added a commit that referenced this issue Jan 3, 2018

@nex3 nex3 closed this in #747 Jan 3, 2018

nex3 added a commit that referenced this issue Jan 3, 2018

@cedx

This comment has been minimized.

Copy link
Author

commented Jan 3, 2018

Thanks a lot @nex3 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.