Skip to content

Commit

Permalink
refactor(NODE-3717): reorganize tests pt5
Browse files Browse the repository at this point in the history
  • Loading branch information
dariakp committed Dec 22, 2021
1 parent 451627a commit 54f2352
Show file tree
Hide file tree
Showing 16 changed files with 584 additions and 650 deletions.
7 changes: 6 additions & 1 deletion test/functional/byo_promises.test.js
@@ -1,11 +1,16 @@
'use strict';

var expect = require('chai').expect;
const { expect } = require('chai');
const { PromiseProvider } = require('../../src/promise_provider');

class CustomPromise extends Promise {}
CustomPromise.prototype.isCustomMongo = true;

describe('Optional PromiseLibrary / maybePromise', function () {
afterEach(() => {
PromiseProvider.set(Promise);
});

it('should correctly implement custom dependency-less promise', function (done) {
const getCustomPromise = v => new CustomPromise(resolve => resolve(v));
const getNativePromise = v => new Promise(resolve => resolve(v));
Expand Down

0 comments on commit 54f2352

Please sign in to comment.