Comments (5)
--pathname
is default to /test/
it's the URL pathname.
so suppose the cwd is my-component
the server will serve files from there, so you have to set the tests pathname where the index.html
is located.
I decided to go with --pathname
because most ? devs will build to my-component/build.js
or my-component/build/build.js
etc.., so you would rarely build to my-component/tests/build.js
.
from test.
I decided to go with --pathname because most ? devs will build to my-component/build.js or my-component/build/build.js etc.., so you would rarely build to my-component/tests/build.js.
yeah, I'm putting my "built" test file in ./build/tests.js
:
JS = $(wildcard index.js lib/*/*.js)
STYL = $(wildcard lib/*/*.styl)
TESTS = $(filter-out test/index.js, $(wildcard test/*.js))
TEST_ENTRY = test/index.js
test: build/tests.js
@$(NODE) $(BIN)/duo-test \
--build $^ \
--reporter spec \
phantomjs
build/tests.js: $(TESTS) $(TEST_ENTRY)
@mkdir -p $(dir $@)
@$(BIN)/duo \
--root . \
--development \
$(TEST_ENTRY) > $@
$(TEST_ENTRY): $(JS) $(TESTS)
@echo '// GENERATED FILE. DO NOT EDIT.' > $@
@$(foreach test, $(TESTS), echo 'require("./$(test)");' >> $@;)
.PHONY: test
from test.
@stephenmathieson yup, but most devs won't do that and get confused i think. (btw nice Makefile haha)
from test.
@matthewmueller can we close?
from test.
yep!
from test.
Related Issues (20)
- test duration should be correct
- browsers
- JS errors cause PhantomJS runner to hang HOT 6
- is there anyway to exclude timeout saucelabs test HOT 5
- better error messages HOT 3
- example advanced error HOT 2
- allow passing phantomjs args HOT 1
- Testing React components HOT 6
- Building the library example HOT 6
- Unable to test in safari? HOT 7
- unable to specify reporter HOT 2
- fix travis HOT 2
- browsers not up-to-date HOT 1
- doesn't support node 0.10 HOT 1
- http://localhost:50495/duotest?id=undefined HOT 4
- source map support in testing
- Proposal: Change CLI to accept entry files (similar to the duo itself)
- Error: timeout of "2000" reached when there is an index.html
- add me (and others) to npm HOT 2
- flag to not open a browser
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from test.