Skip to content

trying to get npm to pass the test #106

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
59 changes: 34 additions & 25 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@
<html>
<head>
<title>Exercises</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<script>
// // TODO: (Optional) link up data for browser tests
// getData()

// function getData() {
// return fetch('data/person-1.json')
// .then(res => res.json())
Expand All @@ -18,28 +15,41 @@
// }
</script>
<script>
window.showInstallMessage = function showInstallMessage() {
const msg = 'ERROR: Expected modules failed to load (chai, mocha)!!!\n\nHOW TO FIX: Run `npm install` in terminal from this project\'s folder.'
showInstallMessage.count = showInstallMessage.count ? showInstallMessage.count++ : 1
if (showInstallMessage.count >= 1) return console.error(msg)
alert(msg)
}
window.showInstallMessage = function showInstallMessage() {
const msg =
"ERROR: Expected modules failed to load (chai, mocha)!!!\n\nHOW TO FIX: Run `npm install` in terminal from this project's folder.";
showInstallMessage.count = showInstallMessage.count
? showInstallMessage.count++
: 1;
if (showInstallMessage.count >= 1) return console.error(msg);
alert(msg);
};
</script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/mocha/6.2.0/mocha.min.css" onerror="showInstallMessage()" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/mocha/6.2.0/mocha.min.js" onerror="showInstallMessage()"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/chai/4.2.0/chai.min.js" onerror="showInstallMessage()"></script>
<link
href="https://cdnjs.cloudflare.com/ajax/libs/mocha/6.2.0/mocha.min.css"
onerror="showInstallMessage()"
rel="stylesheet"
/>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/mocha/6.2.0/mocha.min.js"
onerror="showInstallMessage()"
></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/chai/4.2.0/chai.min.js"
onerror="showInstallMessage()"
></script>
<script>
mocha.setup('bdd')
chai.config.includeStack = true
var expect = chai.expect
mocha.setup("bdd");
chai.config.includeStack = true;
var expect = chai.expect;
</script>
<style>
body {
zoom: 1.75;
}
#mocha .test h2 {
text-decoration: underline;
}
body {
zoom: 1.75;
}
#mocha .test h2 {
text-decoration: underline;
}
</style>
</head>
<body onload="mocha.run()">
Expand All @@ -50,6 +60,5 @@

<!-- load your test files here -->
<script src="test/index.test.js"></script>

</body>
</html>
Loading