Skip to content

Commit 44a38ac

Browse files
committed
set node_modules path for tests
1 parent 5da1229 commit 44a38ac

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5-
## [0.9.0] - 2016-08-01
5+
## [0.9.2] - 2016-08-01
66
- add "exists" global file path checker
77
- upgrade to [email protected]
8+
- set "node_modules" to user project directory
89

910
## [0.8.0] - 2016-06-28
1011
- load with object

lib/runner-process.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ function runnerProcess(config) {
3636
ATOM_SHELL_INTERNAL_RUN_AS_NODE: 1,
3737
DIR: config.dir,
3838
TUTORIAL_DIR: config.dir,
39-
TASK_POSITION: config.taskPosition
39+
TASK_POSITION: config.taskPosition,
40+
NODE_PATH: path_1.join(config.dir, 'node_modules'),
4041
});
4142
return child_process_1.spawn(node, [
4243
mocha,

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mocha-coderoad",
3-
"version": "0.9.1",
3+
"version": "0.9.2",
44
"description": "mocha test runner & reporter for atom-coderoad",
55
"main": "lib/index.js",
66
"scripts": {

src/runner-process.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ export default function runnerProcess(config: CR.Config) {
4141
ATOM_SHELL_INTERNAL_RUN_AS_NODE: 1,
4242
DIR: config.dir,
4343
TUTORIAL_DIR: config.dir,
44-
TASK_POSITION: config.taskPosition
44+
TASK_POSITION: config.taskPosition,
45+
NODE_PATH: join(config.dir, 'node_modules'),
4546
});
4647

4748
// spawn child process calling mocha test runner

0 commit comments

Comments
 (0)