Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jasmine-ts

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jasmine-ts - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

51

lib/index.js
#!/usr/bin/env node
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var fs = require("fs");
var path = require("path");
require("ts-node/register");
var Jasmine = require("jasmine");
var Command = require("jasmine/lib/command");
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 configPath = process.env.JASMINE_CONFIG_PATH || "spec/support/jasmine.json";
var initReporters = function (config) {
const fs = require("fs");
const path = require("path");
const dist_1 = require("ts-node/dist");
const yargs_1 = require("yargs");
const TS_NODE_OPTIONS = [
"fast",
"lazy",
"cache",
"cacheDirectory",
"compiler",
"project",
"ignore",
"ignoreWarnings",
"disableWarnings",
"getFile",
"fileExists",
"compilerOptions",
];
const tsNodeOptions = Object.assign({}, ...TS_NODE_OPTIONS.map((option) => yargs_1.argv[option] && { [option]: yargs_1.argv[option] }));
dist_1.register(tsNodeOptions);
const Jasmine = require("jasmine");
const Command = require("jasmine/lib/command");
const jasmine = new Jasmine({ projectBaseDir: path.resolve() });
const examplesDir = path.join("node_modules", "jasmine-core", "lib", "jasmine-core", "example", "node_example");
const command = new Command(path.resolve(), examplesDir, console.log);
const configPath = process.env.JASMINE_CONFIG_PATH || "spec/support/jasmine.json";
const initReporters = (config) => {
if (config.reporters && config.reporters.length > 0) {
jasmine.env.clearReporters();
config.reporters.forEach(function (reporter) {
var parts = reporter.name.split("#");
var name = parts[0];
var member = parts[1];
var reporterClass = member ? require(name)[member] : require(name);
config.reporters.forEach((reporter) => {
const parts = reporter.name.split("#");
const name = parts[0];
const member = parts[1];
const reporterClass = member ? require(name)[member] : require(name);
jasmine.addReporter(new (reporterClass)(reporter.options));

@@ -25,3 +42,3 @@ });

};
var configJSON = "";
let configJSON = "";
try {

@@ -32,3 +49,3 @@ configJSON = fs.readFileSync(path.resolve(configPath), "utf8");

if (configJSON) {
var config = JSON.parse(configJSON);
const config = JSON.parse(configJSON);
initReporters(config);

@@ -35,0 +52,0 @@ }

{
"name": "jasmine-ts",
"version": "0.1.2",
"version": "0.1.3",
"description": "Execute jasmine with ts-node",

@@ -31,3 +31,4 @@ "main": "lib/index.js",

"ts-node": "^2.1.0",
"typescript": "^2.3.2"
"typescript": "^2.3.2",
"yargs": "^8.0.1"
},

@@ -37,5 +38,9 @@ "devDependencies": {

"@types/node": "^7.0.8",
"@types/yargs": "^6.6.0",
"jasmine-spec-reporter": "^3.2.0",
"tslint": "^4.5.1"
},
"engines": {
"node": ">= 5.12"
}
}

@@ -21,3 +21,3 @@ # jasmine-ts

"scripts": {
"test": "jasmine-ts 'path/to/specs/**/*.spec.ts'"
"test": "jasmine-ts \"path/to/specs/**/*.spec.ts\""
}

@@ -35,3 +35,3 @@ }

[jasmine-spec-reporter](https://github.com/bcaudan/jasmine-spec-reporter),
you can add a reporters array to the `jasmine.json`
which provides a nice output, you can add a reporters array to the `jasmine.json`
file like this:

@@ -64,4 +64,12 @@

TypeScript 2:
```
npm i -D @types/jasmine
```
TypeScript 1:
```
typings i -DG dt~jasmine
```
Since `0.1.3` [ts-node options](https://www.npmjs.com/package/ts-node#configuration-options) are passed through to ts-node.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc