GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — HelloCodeSchoolProject/test/index_test.js at master · estherMC/HelloCodeSchoolProject Expand file tree/ Copy pathindex_test.jsMore file actions executable file ·49 lines (41 loc) · 1.68 KB / Copy pathindex_test.jsFile metadata and controlsexecutable file ·49 lines (41 loc) · 1.68 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 var jsdom = require('jsdom'), fs = require('fs'), assert = require('chai').assert, file = fs.readFileSync('index.html').toString(); describe('Your HTML Page', function() { var window; before(function(next) { jsdom.env( file, ["http://code.jquery.com/jquery.js"], function (err, w) { if(err) { next(err); } window = w; next(); } ); }); it('should have a title @title', function() { assert.equal(window.$('title').length, 1, 'Make sure to create a `title` element.'); }); it('should have a title that contains your name @title', function() { assert.notEqual(window.$('title').text(), '', 'Make sure to set the content of the `title` element to your Code School username.'); }); it('should have a h1 element @h1', function() { assert.isAtLeast(window.$('h1').length, 1, "Make sure to create an `h1` element."); }); it('should have content in the h1 element @h1', function() { assert.equal(window.$('h1').text(), 'Hello, Code School!', "Make sure to set the content of your `h1` element to 'Hello, Code School!'."); }); it('should have a ul @ul', function() { assert.isAtLeast(window.$('ul').length, 1, "Make sure to create a `ul` element."); }); it('should have at least 2 li elements @li', function() { assert.isAtLeast(window.$('li').length, 2, "Make sure to create at least 2 `li` elements."); }); it('should have content for all `li` elements. @li', function() { var message = "Make sure to include something you want to learn for each `li` element." assert.notEqual(window.$('li:first').text(), '', message); assert.notEqual(window.$('li:last').text(), '', message); }); }); |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |