Mocha + Chai tests for ExtJs -


hello i'm stumbling upon issue while trying create tests extjs. getting ext not defined error

my html report file

<!doctype html> <html>  <head>     <title>mocha tests</title>     <link type="text/css" rel="stylesheet" href="path/to/mocha/css" /> </head>  <body>     <div id="mocha"></div>      <script type="text/javascript" src="path/to/mocha/js"></script>     <script type="text/javascript" src="path/to/chai/js"></script>      <script>         mocha.setup('bdd');     </script>      <script type="text/javascript" src="path/to/extjs/controller"></script>     <script type="text/javascript" src="path/to/extjs/viewmodel"></script>     <script type="text/javascript" src="path/to/extjs/view"></script>      <script type="text/javascript" src="path/to/test"></script>      <script>         mocha.checkleaks();         mocha.globals(['ext']);          mocha.run();     </script> </body>  </html> 

my test file

 describe('ext', function() {         var expect = chai.expect;          it('should init', function(done) {             expect(ext).to.exist;         });     }); 

i kinda new mocha , thought globals's job that, don't need add script of framework well. guess wrong , should add it, ot else ? it's confusing...


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -