jasmine-ts
Advanced tools
Comparing version 0.0.1 to 0.0.2
25
index.js
#!/usr/bin/env node | ||
"use strict"; | ||
require("ts-node/register"); | ||
require("jasmine/bin/jasmine"); | ||
//# sourceMappingURL=index.js.map | ||
var path = require("path"); | ||
var fs = require("fs"); | ||
var Jasmine = require("jasmine"); | ||
var Command = require("jasmine/lib/command.js"); | ||
var jasmine = new Jasmine({ projectBaseDir: path.resolve() }); | ||
var examplesDir = path.join("node_modules", "jasmine-core", "lib", "jasmine-core", "example", "node_example"); | ||
var command = new Command(path.resolve(), examplesDir, console.log); | ||
var initReporters = () => { | ||
var configPath = process.env.JASMINE_CONFIG_PATH || "spec/support/jasmine.json"; | ||
var config = JSON.parse(fs.readFileSync(path.resolve(configPath))); | ||
if(config.reporters && config.reporters.length > 0) { | ||
config.reporters.forEach(reporter => | ||
jasmine.addReporter(new (require(reporter.name))(reporter.options)) | ||
); | ||
} | ||
}; | ||
initReporters(); | ||
command.run(jasmine, process.argv.slice(2)); |
{ | ||
"name": "jasmine-ts", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Execute jasmine with ts-node", | ||
@@ -8,3 +8,3 @@ "main": "index.js", | ||
"scripts": { | ||
"prepublish": "typings i && tsc" | ||
"test": "typings i && node index.js -- spec/jasmine-ts.spec.ts" | ||
}, | ||
@@ -34,4 +34,5 @@ "repository": { | ||
"devDependencies": { | ||
"typings": "^0.8.1" | ||
"typings": "^0.8.1", | ||
"jasmine-spec-reporter": "^2.4.0" | ||
} | ||
} |
# jasmine-ts | ||
[![Build Status](https://travis-ci.org/svi3c/jasmine-ts.svg?branch=master)](https://travis-ci.org/svi3c/jasmine-ts) | ||
A simplification for running [jasmine](https://www.npmjs.com/package/jasmine) with | ||
@@ -29,2 +31,21 @@ [ts-node](https://github.com/TypeStrong/ts-node). | ||
Note: This module enables the configuration support of | ||
reporters. For example, if you want to use the | ||
[jasmine-spec-reporter](https://github.com/bcaudan/jasmine-spec-reporter), | ||
you can add a reporters array to the `jasmine.json` | ||
file like this: | ||
```json | ||
{ | ||
"reporters": [ | ||
{ | ||
"name": "jasmine-spec-reporter", | ||
"options": { | ||
"displayStacktrace": "all" | ||
} | ||
} | ||
] | ||
} | ||
``` | ||
* Run the tests | ||
@@ -31,0 +52,0 @@ |
@@ -5,5 +5,5 @@ { | ||
"dependencies": {}, | ||
"ambientDependencies": { | ||
"jasmine": "registry:dt/jasmine#2.2.0+20160317120654" | ||
"ambientDevDependencies": { | ||
"jasmine": "registry:dt/jasmine#2.2.0+20160505161446" | ||
} | ||
} |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
4097
27
62
2
5
3