This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
59 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
tmp | ||
/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
'use strict' | ||
|
||
const {fork} = require('child_process') | ||
const path = require('path') | ||
|
||
module.exports = function (argv) { | ||
let script = path.join(__dirname, 'run_foreman.js') | ||
let nf = fork(script, argv, {stdio: 'inherit'}) | ||
return new Promise((resolve, reject) => { | ||
nf.on('exit', function (code) { | ||
if (code !== 0) process.exit(code) | ||
resolve() | ||
}) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
require('foreman/nf.js') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bats | ||
|
||
setup() { | ||
run heroku plugins:link . | ||
} | ||
|
||
@test "run" { | ||
run heroku local:run echo 'it works!' | ||
echo $output | ||
[ "$status" -eq 0 ] | ||
[[ "$output" =~ "it works!" ]] | ||
} | ||
|
||
@test "run propagates exit 1" { | ||
run heroku local:run exit 1 | ||
[ "$status" -eq 1 ] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bats | ||
|
||
setup() { | ||
run heroku plugins:link . | ||
} | ||
|
||
@test "version" { | ||
run heroku local:version | ||
echo $output | ||
[ "$status" -eq 0 ] | ||
[[ "$output" =~ "2.0.0" ]] | ||
} |