Created
August 5, 2015 12:25
-
-
Save suisho/5e12224d9de7e159fc6e to your computer and use it in GitHub Desktop.
mochaで特定バージョンだけスキップしたりしなかったりするテストをする。 ref: http://qiita.com/inuscript/items/7e2ece4e659472811fee
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
var semver = require("semver") | |
describe("何らかのテスト", function(){ | |
var itFn = it | |
if(semver(process.version, ' < 0.12')){ | |
itFn = it.skip | |
} | |
itFn("0.12以上ならやるテスト", function(){ | |
// test... | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment