'no method expect' when using Protractor as a library
问题 Using Protractor as a library Unable to require a reference to Jasmine. Referencing the expect method returns output Cannot call method 'expect' of null . Code updated to reflect comments: var protractor = require('protractor'); require('protractor/node_modules/minijasminenode'); require('protractor/jasminewd'); // output: jasmine is undefined (this error can only be seen if the above line is commented out) //expect(true).toBe(true); // output: Cannot call method 'expect' of null var driver =