Socket
Socket
Sign inDemoInstall

chakram

Package Overview
Dependencies
48
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.0 to 0.1.1

CHANGELOG.md

2

lib/assertions/json.js

@@ -43,3 +43,3 @@ var path = require('./../utils/objectPath.js');

if(flag(this, 'contains')) {
assert.to.shallowDeepEqual(toMatch);
assert.to.containSubset(toMatch);
} else {

@@ -46,0 +46,0 @@ assert.to.deep.equal(toMatch);

@@ -13,3 +13,3 @@ /**

chaiAsPromised,
chaiShallow = require('chai-shallow-deep-equal'),
chaiSubset = require('chai-subset'),
chai;

@@ -66,3 +66,3 @@

});
chai.use(chaiShallow);
chai.use(chaiSubset);
chai.use(chaiAsPromised);

@@ -69,0 +69,0 @@ exports.initialized = true;

{
"name": "chakram",
"version": "0.1.0",
"version": "0.1.1",
"description": "Chakram is an API testing framework designed to test JSON REST endpoints. The library offers a BDD testing style and fully exploits javascript promises",

@@ -34,3 +34,3 @@ "main": "lib/chakram.js",

"tv4": "1.1.x",
"chai-shallow-deep-equal": "1.3.x"
"chai-subset": "1.0.x"
},

@@ -50,3 +50,3 @@ "devDependencies": {

"predoc": "npm install",
"doc": "jsdoc -t node_modules/jaguarjs-jsdoc -R README.md -r lib"
"doc": "jsdoc -t node_modules/jaguarjs-jsdoc -c conf.json -R README.md -r lib"
},

@@ -53,0 +53,0 @@ "engines": {

@@ -16,3 +16,3 @@ # Chakram

## Introduction
Chakram builds on top of the mocha testing framework, as such, the tests follow the [BDD style](http://mochajs.org/#getting-started). As this library focuses on testing REST APIs, the tests are naturally asynchronous. Mocha has [native support for promises](http://mochajs.org/#asynchronous-code) which Chakram exploits. All requests and expectations return promises which fulfill to [Chakram response objects](http://dareid.github.io/chakram/global.html#ChakramResponse).
Chakram builds on top of the mocha testing framework, as such, the tests follow the [BDD style](http://mochajs.org/#getting-started). As this library focuses on testing REST APIs, the tests are naturally asynchronous. Mocha has [native support for promises](http://mochajs.org/#asynchronous-code) which Chakram exploits. All requests and expectations return promises which fulfill to [Chakram response objects](http://dareid.github.io/chakram/jsdoc/global.html#ChakramResponse).

@@ -19,0 +19,0 @@ The example below demonstrates a GET request and an assertion of the returned status code. The assertion of the status code returns a promise which is fulfilled once the status code has been checked.

@@ -70,2 +70,12 @@ var chakram = require('./../../lib/chakram.js'),

it("should support negated include JSON assertions", function () {
return postRequest.then(function (resp) {
expect(function() {
expect(resp).to.not.include.json({
json: { number: 20 }
});
}).to.throw(Error);
});
});
it("should be able to specify json path", function () {

@@ -72,0 +82,0 @@ return chakram.waitFor([

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc