forked from shipshapecode/shepherd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic testing framework (shipshapecode#199)
* add mocha package and basic setup * add more to the tour tests * add travis gulp build for tests * Update .gitignore * Update .gitignore * Update .gitignore
- Loading branch information
1 parent
b212313
commit f7d5fc0
Showing
6 changed files
with
827 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/.idea/ | ||
/dist/ | ||
/.log/ | ||
/node_modules/ | ||
|
||
/.DS_Store | ||
/.sass-cache | ||
/npm-debug.log* | ||
/yarn-error.log | ||
/yarn-error.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* global require,describe,it */ | ||
const assert = require('assert'); | ||
const Shepherd = require('../dist/js/shepherd.js'); | ||
|
||
describe('Shepherd', function() { | ||
describe('.Tour()', function() { | ||
const instance = new Shepherd.Tour({ | ||
defaults: { | ||
classes: 'shepherd-theme-arrows', | ||
scrollTo: true | ||
} | ||
}); | ||
it('creates a new tour instance', function() { | ||
|
||
assert.ok(instance instanceof Shepherd.Tour); | ||
}); | ||
|
||
it('returns the default options on the instance', function() { | ||
assert.ok(instance.options); | ||
}); | ||
|
||
describe('.addStep()', function() { | ||
it('adds tour steps', function() { | ||
instance.addStep('test', { | ||
text: 'This is a test step for our tour' | ||
}); | ||
|
||
assert.equal(instance.steps.length, 1); | ||
}); | ||
|
||
// this is not working as documented | ||
it.skip('returns the step options', function() { | ||
assert.ok(instance.defaults); | ||
}); | ||
}); | ||
|
||
}); | ||
}); |
Oops, something went wrong.