Skip to content

Commit

Permalink
fix(objectionary#293): test
Browse files Browse the repository at this point in the history
  • Loading branch information
maxonfjvipon committed Jun 6, 2024
1 parent f5ca836 commit e0ed25a
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion test/test_mvnw.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,26 @@
* SOFTWARE.
*/

const {mvnw} = require('../src/mvnw');
const {mvnw, flags} = require('../src/mvnw');
const assert = require('assert');

describe('mvnw', function() {
it('prints Maven own version', function(done) {
const opts = {batch: true};
mvnw(['--version', '--quiet'], null, opts.batch);
done();
});
it('sets right flags from options', function(done) {
const opts = {
sources: 'sources',
target: 'target',
parser: 'parser',
homeTag: 'homeTag'
}

Check failure on line 40 in test/test_mvnw.js

View workflow job for this annotation

GitHub Actions / build (macos-latest, 17, 16)

Missing semicolon
mvnw(['--version', '--quiet', ...flags(opts)]).then((args) => {
assert.ok(args.includes('-Deo.tag=homeTag'))

Check failure on line 42 in test/test_mvnw.js

View workflow job for this annotation

GitHub Actions / build (macos-latest, 17, 16)

Missing semicolon
assert.ok(args.includes('-Deo.version=parser'))

Check failure on line 43 in test/test_mvnw.js

View workflow job for this annotation

GitHub Actions / build (macos-latest, 17, 16)

Missing semicolon
done();
})

Check failure on line 45 in test/test_mvnw.js

View workflow job for this annotation

GitHub Actions / build (macos-latest, 17, 16)

Missing semicolon
});
});

0 comments on commit e0ed25a

Please sign in to comment.