Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/mocha-3.1.2/test/acceptance/interfaces/tdd.spec.js')
-rw-r--r--tests/lib/mocha-3.1.2/test/acceptance/interfaces/tdd.spec.js42
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/lib/mocha-3.1.2/test/acceptance/interfaces/tdd.spec.js b/tests/lib/mocha-3.1.2/test/acceptance/interfaces/tdd.spec.js
new file mode 100644
index 0000000000..c2db518d70
--- /dev/null
+++ b/tests/lib/mocha-3.1.2/test/acceptance/interfaces/tdd.spec.js
@@ -0,0 +1,42 @@
+'use strict';
+
+suite('integer primitives', function () {
+ suite('arithmetic', function () {
+ var initialValue = 41;
+
+ suiteSetup(function (done) {
+ expect(initialValue).to.eql(41);
+ initialValue += 1;
+ done();
+ });
+
+ test('should add', function () {
+ expect(initialValue).to.eql(42);
+ expect(1 + 1).to.equal(2);
+ expect(2 + 2).to.equal(4);
+ });
+
+ test('should subtract', function () {
+ expect(initialValue).to.eql(42);
+ expect(1 - 1).to.equal(0);
+ expect(2 - 1).to.equal(1);
+ });
+
+ test.skip('should skip this test', function () {
+ var zero = 0;
+ expect(zero).to.equal(1, 'this test should have been skipped');
+ });
+
+ suite.skip('should skip this suite', function () {
+ test('should skip this test', function () {
+ var zero = 0;
+ expect(zero).to.equal(1, 'this test should have been skipped');
+ });
+ });
+
+ suiteTeardown(function (done) {
+ expect(initialValue).to.eql(42);
+ done();
+ });
+ });
+});