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

Idea: mocha for your browser instructions #1738

Closed
rstacruz opened this issue Jun 10, 2015 · 4 comments
Closed

Idea: mocha for your browser instructions #1738

rstacruz opened this issue Jun 10, 2015 · 4 comments
Labels
area: documentation anything involving docs or mochajs.org

Comments

@rstacruz
Copy link
Contributor

Today, to get mocha running on your browser, you have a snippet on the mochajs.org website that looks like this:

<html>
<head>
  <meta charset="utf-8">
  <title>Mocha Tests</title>
  <link rel="stylesheet" href="mocha.css" />
</head>
<body>
  <div id="mocha"></div>
  <script src="jquery.js"></script>
  <script src="expect.js"></script>
  (snip...)

This isn't ideal because:

  1. there's no indication where mocha.css and expect.js (et al) come from.
  2. it doesn't even mention the mocha init command.

Instead, I propose to replace it with something more useful like so:

<!doctype html>
<html>
<head>
  <title>Mocha</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link href="https://cdn.rawgit.com/mochajs/mocha/2.2.4/mocha.css" rel="stylesheet" />
</head>
<body>
  <div id="mocha"></div>
  <script src="https://cdn.rawgit.com/mochajs/mocha/2.2.4/mocha.js"></script>
  <script src="https://cdn.rawgit.com/chaijs/chai/2.3.0/chai.js"></script>
  <script>mocha.setup('bdd')</script
  <script src="tests.js"></script>
  <script>mocha.run()</script>
</body>
</html>
@rstacruz
Copy link
Contributor Author

would be happy to PR this to the gh-pages branch if anyone agrees.

@danielstjules
Copy link
Contributor

Big +1 from me :) I think it'd be super helpful for newcomers.

@travisjeffery
Copy link
Contributor

Sounds cool

On Wednesday, June 10, 2015, Daniel St. Jules [email protected]
wrote:

Big +1 from me :) I think it'd be super helpful for newcomers.


Reply to this email directly or view it on GitHub
#1738 (comment).

@boneskull boneskull added status: accepting prs Mocha can use your help with this one! area: documentation anything involving docs or mochajs.org labels Jun 10, 2015
@rstacruz
Copy link
Contributor Author

probably no PR until #1729 #1726 #1640 get resolved :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: documentation anything involving docs or mochajs.org
Projects
None yet
Development

No branches or pull requests

4 participants