Skip to content

armgit / mocha

Public Imported from GitHub
0

☕️ Classic, reliable, trusted test framework for Node.js and the browser

Reorganizing all sample tests under test/samples

Attila Domokos0cf3ff15b48a
diff --git a/Makefile b/Makefile
index e53bd7ea..21c2cc48 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ SUPPORT = $(wildcard support/*.js)
all: mocha.js mocha.css
-mocha.css: test/browser/style.css
+mocha.css: test/samples/browser/style.css
cp -f $< $@
mocha.js: $(SRC) $(SUPPORT)
@@ -33,56 +33,56 @@ test-bdd:
@./bin/mocha \
--reporter $(REPORTER) \
--ui bdd \
- test/interfaces/bdd
+ test/samples/interfaces/bdd
test-tdd:
@./bin/mocha \
--reporter $(REPORTER) \
--ui tdd \
- test/interfaces/tdd
+ test/samples/interfaces/tdd
test-qunit:
@./bin/mocha \
--reporter $(REPORTER) \
--ui qunit \
- test/interfaces/qunit
+ test/samples/interfaces/qunit
test-exports:
@./bin/mocha \
--reporter $(REPORTER) \
--ui exports \
- test/interfaces/exports
+ test/samples/interfaces/exports
test-grep:
@./bin/mocha \
--reporter $(REPORTER) \
--grep fast \
- test/misc/grep
+ test/samples/misc/grep
test-bail:
@./bin/mocha \
--reporter $(REPORTER) \
--bail \
- test/misc/bail
+ test/samples/misc/bail
non-tty:
@./bin/mocha \
--reporter dot \
- test/interfaces/bdd 2>&1 > /tmp/dot.out
+ test/samples/interfaces/bdd 2>&1 > /tmp/dot.out
@echo dot:
@cat /tmp/dot.out
@./bin/mocha \
--reporter list \
- test/interfaces/bdd 2>&1 > /tmp/list.out
+ test/samples/interfaces/bdd 2>&1 > /tmp/list.out
@echo list:
@cat /tmp/list.out
@./bin/mocha \
--reporter spec \
- test/interfaces/bdd 2>&1 > /tmp/spec.out
+ test/samples/interfaces/bdd 2>&1 > /tmp/spec.out
@echo spec:
@cat /tmp/spec.out
diff --git a/test/browser/array.js b/test/samples/browser/array.js
similarity index 100%
rename from test/browser/array.js
rename to test/samples/browser/array.js
diff --git a/test/browser/index.html b/test/samples/browser/index.html
similarity index 93%
rename from test/browser/index.html
rename to test/samples/browser/index.html
index ce579d55..2d273d1c 100644
--- a/test/browser/index.html
+++ b/test/samples/browser/index.html
@@ -4,7 +4,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="style.css" />
<script src="jquery.js" type="text/javascript"></script>
- <script src="../../mocha.js"></script>
+ <script src="../../../mocha.js"></script>
<script>mocha.setup('bdd')</script>
<script>
function assert(expr, msg) {
@@ -28,4 +28,4 @@
<body>
<div id="mocha"></div>
</body>
-</html>
\ No newline at end of file
+</html>
diff --git a/test/browser/jquery.js b/test/samples/browser/jquery.js
similarity index 100%
rename from test/browser/jquery.js
rename to test/samples/browser/jquery.js
diff --git a/test/browser/large.html b/test/samples/browser/large.html
similarity index 100%
rename from test/browser/large.html
rename to test/samples/browser/large.html
diff --git a/test/browser/large.js b/test/samples/browser/large.js
similarity index 100%
rename from test/browser/large.js
rename to test/samples/browser/large.js
diff --git a/test/browser/style.css b/test/samples/browser/style.css
similarity index 100%
rename from test/browser/style.css
rename to test/samples/browser/style.css
diff --git a/test/context.js b/test/samples/context.js
similarity index 100%
rename from test/context.js
rename to test/samples/context.js
diff --git a/test/duration.js b/test/samples/duration.js
similarity index 100%
rename from test/duration.js
rename to test/samples/duration.js
diff --git a/test/fs.js b/test/samples/fs.js
similarity index 100%
rename from test/fs.js
rename to test/samples/fs.js
diff --git a/test/globals.js b/test/samples/globals.js
similarity index 100%
rename from test/globals.js
rename to test/samples/globals.js
diff --git a/test/http.js b/test/samples/http.js
similarity index 100%
rename from test/http.js
rename to test/samples/http.js
diff --git a/test/interfaces/bdd.js b/test/samples/interfaces/bdd.js
similarity index 100%
rename from test/interfaces/bdd.js
rename to test/samples/interfaces/bdd.js
diff --git a/test/interfaces/exports.js b/test/samples/interfaces/exports.js
similarity index 100%
rename from test/interfaces/exports.js
rename to test/samples/interfaces/exports.js
diff --git a/test/interfaces/qunit.js b/test/samples/interfaces/qunit.js
similarity index 100%
rename from test/interfaces/qunit.js
rename to test/samples/interfaces/qunit.js
diff --git a/test/interfaces/tdd.js b/test/samples/interfaces/tdd.js
similarity index 100%
rename from test/interfaces/tdd.js
rename to test/samples/interfaces/tdd.js
diff --git a/test/merge.js b/test/samples/merge.js
similarity index 100%
rename from test/merge.js
rename to test/samples/merge.js
diff --git a/test/misc/bail.js b/test/samples/misc/bail.js
similarity index 100%
rename from test/misc/bail.js
rename to test/samples/misc/bail.js
diff --git a/test/misc/cascade.js b/test/samples/misc/cascade.js
similarity index 100%
rename from test/misc/cascade.js
rename to test/samples/misc/cascade.js
diff --git a/test/misc/grep.js b/test/samples/misc/grep.js
similarity index 100%
rename from test/misc/grep.js
rename to test/samples/misc/grep.js
diff --git a/test/misc/nontty.js b/test/samples/misc/nontty.js
similarity index 100%
rename from test/misc/nontty.js
rename to test/samples/misc/nontty.js
diff --git a/test/multiple.done.js b/test/samples/multiple.done.js
similarity index 100%
rename from test/multiple.done.js
rename to test/samples/multiple.done.js
diff --git a/test/pending.js b/test/samples/pending.js
similarity index 100%
rename from test/pending.js
rename to test/samples/pending.js
diff --git a/test/root.js b/test/samples/root.js
similarity index 100%
rename from test/root.js
rename to test/samples/root.js
diff --git a/test/test.coffee b/test/samples/test.coffee
similarity index 100%
rename from test/test.coffee
rename to test/samples/test.coffee
diff --git a/test/timeout.js b/test/samples/timeout.js
similarity index 100%
rename from test/timeout.js
rename to test/samples/timeout.js
diff --git a/test/uncaught.js b/test/samples/uncaught.js
similarity index 100%
rename from test/uncaught.js
rename to test/samples/uncaught.js