Skip to content

Commit

Permalink
Added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SenjeyB committed Dec 10, 2024
1 parent 2e5a2c8 commit a557fff
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions test/commands/test_docs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2022-2024 Objectionary.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

const assert = require('assert');
const {runSync} = require('../helpers');

/**
* It should print a "not yet implemented" message when run.
* @param {Function} done - Mocha's callback to signal completion
*/
describe('docs', function() {

Check failure on line 32 in test/commands/test_docs.js

View workflow job for this annotation

GitHub Actions / build (ubuntu-24.04, 17, 16)

Block must not be padded by blank lines

it('generate documentation from XMIR files', function(done) {
const stdout = runSync(['docs']);
assert(
stdout.includes('This command is not yet implemented, sorry'),
`Expected "This command is not yet implemented, sorry" but got: ${stdout}`
);
done();
});

Check failure on line 41 in test/commands/test_docs.js

View workflow job for this annotation

GitHub Actions / build (ubuntu-24.04, 17, 16)

Block must not be padded by blank lines

});

0 comments on commit a557fff

Please sign in to comment.