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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -