loopback-datasource-juggler/test/helpers/bdd-if.js

25 lines
576 B
JavaScript
Raw Normal View History

2019-05-08 15:45:37 +00:00
// Copyright IBM Corp. 2016,2018. All Rights Reserved.
// Node module: loopback-datasource-juggler
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
2019-05-08 15:45:37 +00:00
'use strict';
2018-12-07 14:54:29 +00:00
const fmt = require('util').format;
exports.describeIf = function describeIf(cond, name, fn) {
if (cond)
describe(name, fn);
else {
describe.skip(fmt('[UNSUPPORTED] - %s', name), fn);
}
};
exports.itIf = function itIf(cond, name, fn) {
if (cond)
it(name, fn);
else {
it.skip(fmt('[UNSUPPORTED] - %s', name), fn);
}
};