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

Eliminate shell scripts from Mocha's test suite #2805

Closed
ScottFreeCode opened this issue May 14, 2017 · 4 comments
Closed

Eliminate shell scripts from Mocha's test suite #2805

ScottFreeCode opened this issue May 14, 2017 · 4 comments
Labels
status: accepting prs Mocha can use your help with this one! type: chore generally involving deps, tooling, configuration, etc.

Comments

@ScottFreeCode
Copy link
Contributor

ScottFreeCode commented May 14, 2017

Besides getting ourselves off the Makefile (#2268?), the other thing that doesn't work on a default Windows development environment is Unix/Linux shell scripts. (Even with a Posixy environment, they can have problems with line endings like #2801; this would not be an issue if they weren't Posixy shell scripts in the first place.) As far as I am aware, Node's child_process actions can run anything in a shell the same as if it were in a .sh script, so we should be able to convert any such test files to proper JS test files.

The one of these of which I am aware is:

  • test/acceptance/glob/glob.sh

(We can make an exception for scripts used only by CI and not local test runs, of course.)

@ScottFreeCode ScottFreeCode added type: chore generally involving deps, tooling, configuration, etc. status: accepting prs Mocha can use your help with this one! labels May 14, 2017
@Munter
Copy link
Member

Munter commented May 15, 2017

Relevant to migrating away from shellscripts for test:

https://gitter.im/unexpectedjs/unexpected?at=5919695c2b926f8a6757de02

Munter added a commit that referenced this issue May 19, 2017
Move linting into an npm script. Relates to #2805
@kunagpal
Copy link
Contributor

At present, the following three shell scripts remain:

test/acceptance/glob/glob.sh
scripts/travis-before-install.sh
scripts/travis-before-script.sh

If glob.sh is indeed a valid exception, then this issue can be closed, as #2807 has landed in master, and has been released in v3.4.2

@ScottFreeCode
Copy link
Contributor Author

To clarify, the parenthetical about CI scripts was referring to those Travis scripts, and glob.sh was not proposed as an exception but as an example of the sort of scripts the issue is about -- required for Mocha's complete test suite to be run yet themselves requiring a Posix shell and/or environment (both in this case).

@Munter
Copy link
Member

Munter commented May 31, 2017

The travis scripts are fine. They are never required for local execution. We need to convert the glob script and also get rid of the makefile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepting prs Mocha can use your help with this one! type: chore generally involving deps, tooling, configuration, etc.
Projects
None yet
Development

No branches or pull requests

3 participants