Add should and assert to coursewares and write code to test multiple instances of an element for a condition
This commit is contained in:
@ -40,7 +40,8 @@ var libraryIncludes = "<script src='//ajax.googleapis.com/ajax/libs/jquery/2.1.3
|
||||
"<link rel='stylesheet' href='//cdnjs.cloudflare.com/ajax/libs/animate.css/3.2.0/animate.min.css'/>" +
|
||||
"<link rel='stylesheet' href='//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css'/>" +
|
||||
"<link rel='stylesheet' href='//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css'/>" +
|
||||
"<style>body { padding: 0px 3px 0px 3px; }</style>";
|
||||
"<style>body { padding: 0px 3px 0px 3px; }</style>" +
|
||||
"<script>var expect = chai.expect; var should = chai.should(); var assert = chai.assert;</script>";
|
||||
|
||||
var allTests = '';
|
||||
(function() {
|
||||
|
@ -646,7 +646,7 @@
|
||||
],
|
||||
"tests": [
|
||||
"expect((/free(\\s+)?code(\\s+)?camp(\\s+)?/gi).test($('a').text())).to.be.true;",
|
||||
"expect((/free(\\s+)?code(\\s+)?camp(\\s+)?/gi).test($('a').attr('href').text())).to.be.true;"
|
||||
"expect($('a').filter(function(index) { return /freecodecamp\\.com/gi.test($('a')[index]); }).length).to.eql(1);"
|
||||
],
|
||||
"challengeSeed": [
|
||||
"<style>",
|
||||
|
Reference in New Issue
Block a user