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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom runner, cannot use a glob #1579

Closed
dhoko opened this issue Jun 28, 2017 · 3 comments
Closed

Custom runner, cannot use a glob #1579

dhoko opened this issue Jun 28, 2017 · 3 comments
Labels
STATE: Auto-locked An issue has been automatically locked by the Lock bot.

Comments

@dhoko
Copy link

dhoko commented Jun 28, 2017

Hey 馃憢

Imho it's better if we we can use a glob with the runner, instead of loading the glob ourselves and give to the .src() the output. Via the CLI we can give a glob.

Are you requesting a feature or reporting a bug?

feature

What is the current behavior?

An error

{ Error: Cannot find a test source file at "/home/dhoko/[custom]/test/e2e/specs/**/*.js".
    at Compiler._callee$ (/home/dhoko/[custom]/node_modules/testcafe/lib/compiler/index.js
:106:35)
    at tryCatch (/home/dhoko/[custom]/node_modules/regenerator-runtime/runtime.js:65:40)
    at Generator.invoke [as _invoke] (/home/dhoko/[custom]/node_modules/regenerator-runtime/runtime.js:303:22)
    at Generator.prototype.(anonymous function) [as throw] (/home/dhoko/[custom]/node_modules/regenerator-runtime/runtime.js:117:21)
    at step (/home/dhoko/[custom]/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /home/dhoko/[custom]/node_modules/babel-runtime/helpers/asyncToGenerator.js:30:13 constructor: [Function: GeneralError] }

What is the expected behavior?

Same as the one with the CLI, we load a glob, it works

Provide the test code and the tested page URL (if applicable)

Test code

#!/usr/bin/env node

const createTestCafe = require('testcafe');
const {  ALL } = require('./config');

createTestCafe('localhost', 1664)
    .then((instance) => {
        const runner = instance.createRunner();

        return runner.src(ALL)
            .browsers(['chrome'])
            .run();
    })

If ALL === /home/dhoko/[custom]/test/e2e/specs/**/*.js or test/e2e/specs/ it doesn't work.
Via the CLI if the input is test/e2e/specs/ testcafe creates this glob test/e2e/specs/**/*@(.test.js|.js|.ts|.testcafe) cf

Specify your

  • operating system: GNU/Linux Ubuntu 16.10
  • testcafe version: 0.16.1
  • node.js version: 7.0.0
@inikulin
Copy link
Contributor

I guess it's a duplicate of #980

@dhoko
Copy link
Author

dhoko commented Jun 28, 2017

Woops I forgot to check 馃榿

@dhoko dhoko closed this as completed Jun 28, 2017
@lock
Copy link

lock bot commented Mar 28, 2019

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.

@lock lock bot added the STATE: Auto-locked An issue has been automatically locked by the Lock bot. label Mar 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
STATE: Auto-locked An issue has been automatically locked by the Lock bot.
Projects
None yet
Development

No branches or pull requests

2 participants