[Tests] Set up “mocks” directory, and updater script.
parent
ac18d01854
commit
96afff7af2
|
@ -9,7 +9,7 @@ cleanup() {
|
|||
. ../../../nvm.sh
|
||||
|
||||
# sample output at the time the test was written
|
||||
TAB_PATH="$PWD/nodejs.org-dist-index.tab"
|
||||
TAB_PATH="$PWD/mocks/nodejs.org-dist-index.tab"
|
||||
nvm_download() {
|
||||
cat "$TAB_PATH"
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ cleanup() {
|
|||
. ../../../nvm.sh
|
||||
|
||||
# sample output at the time the test was written
|
||||
TAB_PATH="$PWD/iojs.org-dist-index.tab"
|
||||
TAB_PATH="$PWD/mocks/iojs.org-dist-index.tab"
|
||||
nvm_download() {
|
||||
cat "$TAB_PATH"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
echo 'Updating test mocks...'
|
||||
|
||||
MOCKS_DIR="$PWD/test/fast/Unit tests/mocks"
|
||||
|
||||
echo "creating $MOCKS_DIR"
|
||||
mkdir -p MOCKS_DIR
|
||||
|
||||
. "$NVM_DIR/nvm.sh"
|
||||
|
||||
nvm_download -L -s "$NVM_NODEJS_ORG_MIRROR/index.tab" -o - > "$MOCKS_DIR/nodejs.org-dist-index.tab"
|
||||
nvm_download -L -s "$NVM_IOJS_ORG_MIRROR/index.tab" -o - > "$MOCKS_DIR/iojs.org-dist-index.tab"
|
||||
|
||||
echo "done! Don't forget to git commit them."
|
Loading…
Reference in New Issue