4

We are using Protractor to test our AngularJS application. We need to import and use other Javascript libraries like Underscore and Chance(random generator) in my Protractor Test cases. Can someone please let me know how to do the same - thanks.

alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195

1 Answers1

4

Add the dependency:

npm install underscore --save

Then use it in your test:

var _ = require('underscore');
describe('', function(){
  it('should use underscore', function(){
    _.
  });
});
Andres D
  • 8,910
  • 2
  • 26
  • 31