forked from learn-co-curriculum/phase-1-control-flow-lab
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kellye Greene
committed
Apr 19, 2019
1 parent
a770987
commit 187c3fe
Showing
4 changed files
with
38 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
|
||
<title>JavaScript Basics Control Flow Lab </title> | ||
<meta name="description" content="Introduction to JavaScript Basics Control Flow Lab in the Learn.co curriculum"> | ||
<meta name="author" content="Flatiron School"> | ||
|
||
<link rel="stylesheet" href="node_modules/mocha/mocha.css"> | ||
</head> | ||
|
||
<body> | ||
<!-- <div> for Mocha to display test results. --> | ||
<div id="mocha"></div> | ||
|
||
<!-- Include Mocha and set it up for BDD-style testing. --> | ||
<script src="node_modules/mocha/mocha.js"></script> | ||
<script>mocha.setup('bdd');</script> | ||
|
||
<!-- Include Chai as the matcher library. --> | ||
<script src="node_modules/chai/chai.js"></script> | ||
|
||
<!-- Include the student's JavaScript file. --> | ||
<script src="index.js"></script> | ||
|
||
<!-- Include the JavaScript file containing the tests. --> | ||
<script src="test/indexTest.js"></script> | ||
|
||
<!-- Include Flatiron School's test runner to push results to Learn. --> | ||
<script src="node_modules/learn-browser/learnBrowser.min.js"></script> | ||
</body> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>JavaScript Lab</title> | ||
</head> | ||
<body> | ||
hello | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const chai = require('chai') | ||
global.expect = chai.expect | ||
const fs = require('file-system') | ||
const jsdom = require('mocha-jsdom') | ||
const path = require('path') | ||
const babel = require('babel-core'); | ||
|
||
const html = fs.readFileSync(path.resolve(__dirname, '..', 'index.html'), 'utf-8') | ||
|
||
const babelResult = babel.transformFileSync( | ||
path.resolve(__dirname, '..', 'index.js'), { | ||
presets: ['env'] | ||
} | ||
); | ||
|
||
const src = babelResult.code | ||
|
||
jsdom({ | ||
html, src | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters