Jasmine-browser full-stack file.
$ bower install jasmine-standaloneindex.html:
<script src="https://code.jquery.com/jquery-1.11.3.js"></script>
<script src="bower_components/jasmine-standalone/jasmine-standalone.js"></script>
<script>
describe('XMLHttpRequest',function(){
describe('http://static.edgy.black',function(){
it('<title> is static.edgy.black',function(done){
xhr= new XMLHttpRequest;
xhr.open('GET','http://static.edgy.black',true);
xhr.responseType= 'text/html';
xhr.send();
xhr.onload= function(){
var parsed= $.parseHTML(xhr.response);
var html= $('<div />').append(parsed);
var textContent= html.find('h1').text();
expect(textContent).toBe('static.edgy.black');
done();
}
});
});
});
</script>Becomes:
$ npm install
$ npm run build