2016-10-07 14:26:18 +00:00
|
|
|
// Copyright IBM Corp. 2016. 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
|
|
|
|
'use strict';
|
|
|
|
|
2018-12-07 16:13:48 +00:00
|
|
|
const fmt = require('util').format;
|
2017-06-05 20:02:53 +00:00
|
|
|
|
2016-10-07 14:26:18 +00:00
|
|
|
exports.describeIf = function describeIf(cond, name, fn) {
|
|
|
|
if (cond)
|
|
|
|
describe(name, fn);
|
2017-06-05 20:02:53 +00:00
|
|
|
else {
|
|
|
|
describe.skip(fmt('[UNSUPPORTED] - %s', name), fn);
|
|
|
|
}
|
2016-10-07 14:26:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
exports.itIf = function itIf(cond, name, fn) {
|
|
|
|
if (cond)
|
|
|
|
it(name, fn);
|
2017-06-05 20:02:53 +00:00
|
|
|
else {
|
|
|
|
it.skip(fmt('[UNSUPPORTED] - %s', name), fn);
|
|
|
|
}
|
2016-10-07 14:26:18 +00:00
|
|
|
};
|