-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
'use strict'; | ||
const MongoClient = require('../..').MongoClient; | ||
|
||
describe('examples.versionedApi:', function() { | ||
let uri; | ||
// eslint-disable-next-line no-unused-vars | ||
let client; | ||
before(function() { | ||
uri = this.configuration.url(); | ||
}); | ||
|
||
it('declare an API version on a client', function() { | ||
// Start Versioned API Example 1 | ||
|
||
client = new MongoClient(uri, { serverApi: { version: '1' } }); | ||
|
||
// End Versioned API Example 1 | ||
}); | ||
|
||
it('declare an API version on a client with strict enabled', function() { | ||
// Start Versioned API Example 2 | ||
|
||
client = new MongoClient(uri, { serverApi: { version: '1', strict: true } }); | ||
|
||
// End Versioned API Example 2 | ||
}); | ||
|
||
it('declare an API version on a client with strict disabled', function() { | ||
// Start Versioned API Example 3 | ||
|
||
client = new MongoClient(uri, { serverApi: { version: '1', strict: false } }); | ||
|
||
// End Versioned API Example 3 | ||
}); | ||
|
||
it('declare an API version on a client with deprecation errors enabled', function() { | ||
// Start Versioned API Example 4 | ||
|
||
client = new MongoClient(uri, { serverApi: { version: '1', deprecationErrors: true } }); | ||
|
||
// End Versioned API Example 4 | ||
}); | ||
}); |