jasmine-node

jasmine-reporters is not generating any file

余生颓废 提交于 2019-12-08 04:15:56
问题 i'm using jasmine-reporters to generate a report after protractor finish the tests, this is my configuration file: onPrepare: function(){ var jasmineReporters = require('jasmine-reporters'); var capsPromise = browser.getCapabilities(); capsPromise.then(function(caps){ var browserName = caps.caps_.browserName.toUpperCase(); var browserVersion = caps.caps_.version; var prePendStr = browserName + "-" + browserVersion + "-"; jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter(

Testing Meteor with Velocity at Codeship

南笙酒味 提交于 2019-12-06 09:43:28
问题 I'm trying to configure a CI infrastructure at Codeship. My local meteor --test command works like charm, but I'm getting a weird error at Codeship. Local: I20141208-12:29:42.602(2)? Started I20141208-12:29:42.602(2)? . I20141208-12:29:42.603(2)? I20141208-12:29:42.603(2)? 1 spec, 0 failures I20141208-12:29:42.603(2)? Finished in 0.014 seconds PASSED jasmine-server-unit : Job => Job should be created with title, description, location and isRemote Codeship: => Started proxy. => Started MongoDB

jasmine-node shows error when ran from command prompt

徘徊边缘 提交于 2019-12-06 08:46:20
问题 Installed jasmine-node using this: sudo npm install jasmine-node -g It is successful and shows: /usr/bin/jasmine-node -> /usr/lib/node_modules/jasmine-node/bin/jasmine-node jasmine-node@1.14.3 /usr/lib/node_modules/jasmine-node ├── underscore@1.6.0 ├── mkdirp@0.3.5 ├── walkdir@0.0.7 ├── jasmine-reporters@2.0.0 ├── coffee-script@1.7.1 ├── requirejs@2.1.14 ├── jasmine-growl-reporter@0.0.3 (growl@1.7.0) └── gaze@0.3.4 (minimatch@0.2.14, fileset@0.1.5) But when I try to run this: $ jasmine-node

No output from jasmine-node

a 夏天 提交于 2019-12-05 21:58:27
I'm new to JavaScript, Node.js and jasmine. I'm trying to run a test from the book "The Node Craftsman Book", FilesizeWatcher. I've created the package.json file and run "npm install", thus installing jasmine-node locally to the project. When I run jasmine-node on the spec file I see only output from console.log but nothing from jasmine. I can see from console.log statements that calls to jasmine (e.g. expect(err).toBe("Path does not start with a slash");) are made, but there is no output. Any idea of where i should start to find an error? I know what code you are referring to. The problem is

node js unit testing: mocking require dependency

不想你离开。 提交于 2019-12-05 04:38:19
I am having issues writing unit test for the following setup as a jira.js file (in a node.js module): var rest = require('restler'); // https://www.npmjs.com/package/restler module.exports = function (conf) { var exported = {}; exported.getIssue = function (issueId, done) { ... rest.get(uri).on('complete', function(data, response) { ... }; return exported; }; Now, i want to write unit test for my getIssue function. 'restler' is a REST client through which i make REST calls to the JIRA API to get a JIRA issue via my code. So to be able to test createIssue(..), I want to be able to mock the

Testing Meteor with Velocity at Codeship

Deadly 提交于 2019-12-04 17:01:05
I'm trying to configure a CI infrastructure at Codeship. My local meteor --test command works like charm, but I'm getting a weird error at Codeship. Local: I20141208-12:29:42.602(2)? Started I20141208-12:29:42.602(2)? . I20141208-12:29:42.603(2)? I20141208-12:29:42.603(2)? 1 spec, 0 failures I20141208-12:29:42.603(2)? Finished in 0.014 seconds PASSED jasmine-server-unit : Job => Job should be created with title, description, location and isRemote Codeship: => Started proxy. => Started MongoDB. => Errors prevented startup: While Building the application: node_modules/velocity-cli/velocity-cli

jasmine-node shows error when ran from command prompt

风流意气都作罢 提交于 2019-12-04 12:04:44
Installed jasmine-node using this: sudo npm install jasmine-node -g It is successful and shows: /usr/bin/jasmine-node -> /usr/lib/node_modules/jasmine-node/bin/jasmine-node jasmine-node@1.14.3 /usr/lib/node_modules/jasmine-node ├── underscore@1.6.0 ├── mkdirp@0.3.5 ├── walkdir@0.0.7 ├── jasmine-reporters@2.0.0 ├── coffee-script@1.7.1 ├── requirejs@2.1.14 ├── jasmine-growl-reporter@0.0.3 (growl@1.7.0) └── gaze@0.3.4 (minimatch@0.2.14, fileset@0.1.5) But when I try to run this: $ jasmine-node spec/ or jasmine-node it shows the error like this: /usr/lib/node_modules/jasmine-node/lib/jasmine-node

Protractor, Jasmine, and stopping test on first fail

十年热恋 提交于 2019-12-03 14:47:28
While trying to figure out how to make certain jasmine expect statements dependent on a previous expect statement I discovered that previous to Jasmine 2.3.0, there was not a way. (see Stop jasmine test after first expect fails ) However, Jasmine 2.3.0 added an option stopSpecOnExpectationFailure that when set to true will stop a test on the first failure. Excited by this prospect, I modified my conf.js to include the option: /* * conf.js */ exports.config = { framework: 'jasmine', specs: ['search-spec.js'], useAllAngular2AppRoots: true, jasmineNodeOpts: { stopSpecOnExpectationFailure: true }

I am finding trouble using log4js-protractor-appender

柔情痞子 提交于 2019-12-02 02:17:41
My log4js.js file code 'use strict'; var log4js = require('log4js'); var log4jsGen = { getLogger: function getLogger() { log4js.loadAppender('file'); log4js.addAppender(log4js.appenders.file('./ApplicationLogs.log'), 'logs'); var logger = log4js.getLogger('logs'); return logger; } }; module.exports = log4jsGen; My conf.js file(specific to appender section only) "appenders": [{ "type": "log4js-protractor-appender", "append": 'false', "maxLogSize": 20480, "backups": 3, "category": "relative-logger" }], Problem: 1) IS there a way that the logs will get overwritten in each run. 2) Why log4js

I am finding trouble using log4js-protractor-appender

我只是一个虾纸丫 提交于 2019-12-02 01:15:33
问题 My log4js.js file code 'use strict'; var log4js = require('log4js'); var log4jsGen = { getLogger: function getLogger() { log4js.loadAppender('file'); log4js.addAppender(log4js.appenders.file('./ApplicationLogs.log'), 'logs'); var logger = log4js.getLogger('logs'); return logger; } }; module.exports = log4jsGen; My conf.js file(specific to appender section only) "appenders": [{ "type": "log4js-protractor-appender", "append": 'false', "maxLogSize": 20480, "backups": 3, "category": "relative