Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Commit

Permalink
- Basic mocha test setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rana Md Ali Ahsan committed Nov 12, 2015
1 parent 956de0a commit cfd7314
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
"swagger-parser": "^3.0.0-alpha.5"
},
"devDependencies": {
"chai": "^3.4.1",
"gulp": "^3.9.0",
"gulp-eslint": "^1.1.0"
"gulp-eslint": "^1.1.0",
"mocha": "^2.3.3"
}
}
8 changes: 8 additions & 0 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
var expect = require("chai").expect,
specConverter = require("../index");

describe("index", function() {
it("should export converter api");
it("should export export api");
it("should export import api");
});
20 changes: 20 additions & 0 deletions test/lib/converter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
var expect = require("chai").expect,
converter = require("../lib/converter");

describe("Converter", function() {
describe("constructor", function(){
it('should successfully create new converter instance');
it('should validate from/to format, throw error otherwise');
});
describe("loadFile", function(){
it('should successfully load comaptible file');
it('should throw error for format incompatible file');
});
describe("loadData", function(){
it('should successfully load raw data');
it('should throw error for format incompatible data');
});
describe("convert", function(){
it('should successfully convert and return converted data');
});
});
3 changes: 3 additions & 0 deletions test/mocha.opts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-t 10000
--recursive

0 comments on commit cfd7314

Please sign in to comment.