Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Jasmine 3.1.0 #1121

Merged
merged 5 commits into from
Mar 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"env": {
"node": true,
"browser": true,
"amd": true
"amd": true,
"jasmine": true
}
}
11 changes: 11 additions & 0 deletions jasmine.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"spec_dir": "test",
"spec_files": [
"**/*-spec.js"
],
"helpers": [
"helpers/**/*.js"
],
"stopSpecOnExpectationFailure": false,
"random": true
}
39 changes: 39 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,18 @@
"eslint-plugin-standard": "^3.0.1",
"front-matter": "^2.3.0",
"glob-to-regexp": "0.3.0",
"jasmine": "^3.1.0",
"markdown": "*",
"markdown-it": "*",
"showdown": "*",
"uglify-js": "^3.3.10"
},
"scripts": {
"test": "node test",
"test": "jasmine --config=jasmine.json",
"test:unit": "npm test -- test/unit/**/*-spec.js",
"test:specs": "npm test -- test/specs/**/*-spec.js",
"test:integration": "npm test -- test/integration/**/*-spec.js",
"test:old": "node test",
"test:lint": "eslint lib/marked.js test/index.js",
"bench": "node test --bench",
"lint": "eslint --fix lib/marked.js test/index.js",
Expand Down
5 changes: 5 additions & 0 deletions test/integration/marked-spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
var marked = require('../../marked.min.js');

it('should run the test', function () {
expect(marked('Hello World!')).toBe('<p>Hello World!</p>\n');
});
12 changes: 12 additions & 0 deletions test/specs/specs-spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
var specTests = require('../');

it('should run spec tests', function () {
// hide output
spyOn(console, 'log');
if (!specTests({stop: true})) {
// if tests fail rerun tests and show output
console.log.and.callThrough();
specTests();
fail();
}
});
7 changes: 7 additions & 0 deletions test/unit/marked-spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var marked = require('../../lib/marked.js');

it('should run the test', function () {
spyOn(marked, 'parse').and.callThrough();
marked.parse('Hello World!');
expect(marked.parse).toHaveBeenCalled();
});