I am browserifying my test files, and would like to pipe them into
protractor instead of having to write to a temporary file, which is
un-gulplike and un-nodelike. I tried piping the browserify output stream
into protractor, but I keep getting errors:
1) Exception loading: /Users/bcherny/Sites/webapp Error
Message:
Error: Cannot find module '/Users/bcherny/Sites/webapp'
Stacktrace:
Error: Cannot find module '/Users/bcherny/Sites/webapp'
at require (module.js:380:17)
at Function.promise (/Users/bcherny/Sites/webapp/node_modules/protractor
/node_modules/q/q.js:650:9)
at _fulfilled (/Users/bcherny/Sites/webapp/node_modules/protractor/
node_modules/q/q.js:797:54)
at self.promiseDispatch.done (/Users/bcherny/Sites/webapp/node_modules/
protractor/node_modules/q/q.js:826:30)
at Promise.promise.promiseDispatch (/Users/bcherny/Sites/webapp/
node_modules/protractor/node_modules/q/q.js:759:13)
at /Users/bcherny/Sites/webapp/node_modules/protractor/node_modules/q/q.
js:525:49
at flush (/Users/bcherny/Sites/webapp/node_modules/protractor/
node_modules/q/q.js:108:17)
at process._tickCallback (node.js:442:13)
...
Here's the relevant excerpt from my gulpfile:
gulp.task 'e2e', ->
browserify
entries: [
'e2e/tests/one.js'
'e2e/tests/two.js'
]
.bundle()
.on 'error', (_.partialRight error, 'Browserify')
.pipe protractor
configFile: 'protractor.conf.coffee'
.on 'error', (_.partialRight error, 'Protractor')
When I use temporary files, everything works fine:
gulp.task 'e2e', ['browserify-e2e'], ->
gulp
.src [
"tmp/**/*.js"
]
.pipe protractor
configFile: 'protractor.conf.coffee'
.on 'error', (_.partialRight error, 'Protractor')
gulp.task 'browserify-e2e', ->
browserify
entries: [
'e2e/tests/one.js'
'e2e/tests/two.js'
]
.bundle()
.on 'error', (_.partialRight error, 'Browserify')
.pipe source 'test.js'
.pipe do buffer
.pipe gulp.dest "tmp/"
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.