it('Bad lu file input throws', function(done) { if (!TRANSLATE_KEY) { this.skip(); } translate.parseAndTranslate(testData.tests.badLu.luFile, TRANSLATE_KEY, testData.tests.badLu.langCode, '', false, false, false) .then(res => done(res)) .catch(function(err) { assert.equal(err.errCode, retCode.errorCode.INVALID_INPUT_FILE); done(); }) });
const describeIfNotEnv = (key, value) => (description, callback, describeFn = describe) => { return value !== process.env[key] ? describeFn(description, callback) : describe.skip(description, callback) }
const testIfKafkaVersion = (version, versionComparator) => { const scopedTest = (description, callback, testFn = test) => { return versionComparator(semver.coerce(process.env.KAFKA_VERSION), semver.coerce(version)) ? testFn(description, callback) : test.skip(description, callback) } scopedTest.only = (description, callback) => scopedTest(description, callback, test.only) return scopedTest }
describe.skip('#setChatAdministratorCustomTitle ', function setChatAdministratorCustomTitleSuite() { it('should set chat permissions', function test() { return bot.setChatAdministratorCustomTitle(GROUPID, USERID, 'Custom Name').then(resp => { assert.ok(is.boolean(resp)); }); }); });
const getBlockedUsersInCommunity = (communityId: string, options: Options): Promise<Array<string>> => { return ( db .table('usersCommunities') .getAll([communityId, false], { index: 'communityIdAndIsMember' }) .filter({ isBlocked: true }) .skip(options.after || 0) .limit(options.first || 25) .map(userCommunity => userCommunity('userId')) .run() ); }
static async list({ offset = 0, limit = 10 } = {}) { const books = await this.find({}) .sort({ createdAt: -1 }) .skip(offset) .limit(limit); return { books }; }
it('should print positive or zero failures with same name tests', function (done) { if (!semver.satisfies(process.version, '>=11.7.0')) this.skip('not for node version'); exec(`${codecept_run_glob('configs/workers/codecept.workers-negative.conf.js')} 2`, (err, stdout, stderr) => { stdout.should.include('Running tests in 2 workers...'); stdout.should.not.include('FAIL | 2 passed, -6 failed'); stdout.should.include('FAIL | 2 passed, 8 failed'); assert(err); done(); }); });
it('Feature can be skipped', () => { suiteConfig = context.Feature.skip('skipped suite'); assert.equal(suiteConfig.suite.pending, true, 'Skipped Feature must be contain pending === true'); assert.equal(suiteConfig.suite.opts.skipInfo.message, 'Skipped due to "skip" on Feature.'); assert.equal(suiteConfig.suite.opts.skipInfo.skipped, true, 'Skip should be set on skipInfo'); });
describe.skip( 'wpcom.site.wpcomPluginsList', function () { it( 'should request wpcom plugins list', ( done ) => { wpcom .site( fixture.site_business ) .wpcomPluginsList() .then( ( list ) => { assert.ok( list.plugins instanceof Array ); done(); } ) .catch( done ); } ); } );
const getTeamMembersInCommunity = ( communityId: string, options: Options ): Promise<Array<string>> => { return db .table('usersCommunities') .getAll([communityId, true], { index: 'communityIdAndIsTeamMember' }) .skip(options.after || 0) .limit(options.first || 25) .map(userCommunity => userCommunity('userId')) .run(); }
it('should print empty results with incorrect glob pattern', function (done) { if (!semver.satisfies(process.version, '>=11.7.0')) this.skip('not for node version'); exec(`${codecept_run_glob('codecept.workers-incorrect-glob.conf.js')} 1 --grep "grep" --debug`, (err, stdout, stderr) => { stdout.should.include('CodeceptJS'); // feature stdout.should.include('Running tests in 1 workers'); stdout.should.include('OK | 0 passed'); assert(!err); done(); }); });
static async list({ offset = 0, limit = 10 } = {}) { const books = await this.find({}) .sort({ createdAt: -1 }) .skip(offset) .limit(limit); return { books }; }
const describeIfEnv = (key, value) => (description, callback, describeFn = describe) => { return value === process.env[key] ? describeFn(description, callback) : describe.skip(description, callback) }
static async list({ offset = 0, limit = 10 } = {}) { const books = await this.find({}) .sort({ createdAt: -1 }) .skip(offset) .limit(limit); return { books }; }
static async list({ offset = 0, limit = 10 } = {}) { const books = await this.find({}) .sort({ createdAt: -1 }) .skip(offset) .limit(limit); return { books }; }