This repository has been archived by the owner on Apr 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 385
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
assert documentation exists when mapboxjs version is bumped in produc…
…tion config (#1309)
- Loading branch information
Katy DeCorah
authored
Oct 18, 2019
1 parent
157fc7d
commit 6e7c408
Showing
2 changed files
with
16 additions
and
1 deletion.
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
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,15 @@ | ||
// makes sure documentation is generated when `mapboxjs: v#.#.#` is updated in _config.publisher-production.yml | ||
var fs = require('fs'); | ||
var jsyaml = require('js-yaml'); | ||
var assert = require('assert'); | ||
|
||
// get mapbox.js version from config | ||
var config = fs.readFileSync('./_config.publisher-production.yml'); | ||
var yaml = jsyaml.load(config); | ||
var mapboxjs = yaml.mapboxjs; | ||
// assert that that docs/_posts/api/v#.#.# exists | ||
describe('Documentation is generated', function() { | ||
it('Documentation for ' + mapboxjs + ' exists', function() { | ||
assert.equal(fs.existsSync('./docs/_posts/api/' + mapboxjs), true); | ||
}); | ||
}); |