Skip to content

Instantly share code, notes, and snippets.

@TakaGoto
Last active August 29, 2015 14:23
Show Gist options
  • Save TakaGoto/6613e522956feed510ab to your computer and use it in GitHub Desktop.
Save TakaGoto/6613e522956feed510ab to your computer and use it in GitHub Desktop.
running a single test file in testem
#example from root: `bin/spec_js test/something/everything/view.coffee
#!/bin/bash
TEST_FILE=$(echo $1 | sed -e "s/test\///g" | sed -e "s/\.coffee//g")
sed -i '' "s|\*\*\/\*|$TEST_FILE|" testem.json
/usr/local/bin/testem
sed -i '' "s|spec/$TEST_FILE|spec\/**\/*|" testem.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment