Skip to content

59naga/jasmine-standalone

Repository files navigation

Jasmine-standalone Bower version

Jasmine-browser full-stack file.

Installation

$ bower install jasmine-standalone

index.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:

2015-05-10 13 15 59

API

http://jasmine.github.io/2.3/introduction.html

Build

$ npm install
$ npm run build

License

MIT

About

Jasmine-browser full-stack file.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages