Skip to content

Commit

Permalink
We have to use mocha from the CDN, browserify cant build mocha see
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfram Kriesing committed Feb 18, 2015
1 parent c3df7d2 commit 92c7394
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/test-runner/mocha/spec-runner.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
<head>
<meta charset="utf-8">
<title>Mocha Tests</title>
<link rel="stylesheet" href="../../../node_modules/mocha/mocha.css" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/mocha/2.1.0/mocha.min.css" />
</head>
<body>
<div id="mocha"></div>
<script src="//cdnjs.cloudflare.com/ajax/libs/mocha/2.1.0/mocha.min.js" type="application/javascript"></script>
<script src="./spec-runner.js" type="application/javascript"></script>
</body>
</html>
1 change: 0 additions & 1 deletion src/test-runner/mocha/spec-runner.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require('mocha');
var expect = require('referee/lib/expect');
var should = require('should');

Expand Down

6 comments on commit 92c7394

@wejrowski
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wolframkriesing Out of curiosity, how did you minify mocha? I'm looking to do the same to run mocha inside Nashorn as a single script. Seems like you need to do a bunch of work arounds to do this.

@wolframkriesing
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the minification takes place here.
https://github.com/tddbin/tddbin-frontend/blob/master/package.json#L13
does that help?

@wolframkriesing
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see, actually, as the commit says: I seemed not to have been able to minify it :/

@wejrowski
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah where did you find this then? cdnjs.cloudflare.com/ajax/libs/mocha/2.1.0/mocha.min.js

@wolframkriesing
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I just tried it, but i dont remember :)

@wejrowski
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha. Sounds good. I think I'll do the same.

Please sign in to comment.