You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are two similar threads to this at #4 - the answer provided leads to this #101
I havn't found that any of them yet really answer the question of how to inlcude the source files I want to test - I'm gonna go onto read the gulp documentation https://github.com/gulpjs/gulp/tree/master/docs
I am currently trying to unit test the following function
I've included my source and spec files like so
The problem is of course that this ../app/scripts/textarea-auto-resize.js doesn't work as the folder structure is like so
-app/
-scripts/
-textarea-auto-resize.js
-test/
-index.html (base html for tests)
-spec/
-unit-test/
I beleive I need to add something more to my gulpfile or my gulpfile is slightly off but not quite sure yet - the scripts function in the gulp file looks like so...
For anyone else asking this question I've dug a bit deeper with this ... understanding GULP is really helpful and here is a great video to help you do just that
Basically though the test suit in my case does work!! 🤦♀️
I just needed to change the script tag for ... <script type="text/javascript" src="../app/scripts/textarea-auto-resize.js"></script>
to <script type="text/javascript" src="/scripts/textarea-auto-resize.js"></script>
This is because when running "serve:test": "cross-env NODE_ENV=test gulp serve",
The Gulp file calls this series... serve = series(clean, scripts, startTestServer);
The final function in this series looks like so...
There are two similar threads to this at #4 - the answer provided leads to this #101
I havn't found that any of them yet really answer the question of how to inlcude the source files I want to test - I'm gonna go onto read the gulp documentation https://github.com/gulpjs/gulp/tree/master/docs
I am currently trying to unit test the following function
I've included my source and spec files like so
The problem is of course that this
../app/scripts/textarea-auto-resize.js
doesn't work as the folder structure is like soI beleive I need to add something more to my gulpfile or my gulpfile is slightly off but not quite sure yet - the scripts function in the gulp file looks like so...
The text was updated successfully, but these errors were encountered: