| 19 | client: null, |
| 20 | commands: { started: [], succeeded: [] }, |
| 21 | async setup(config) { |
| 22 | this.commands = { started: [], succeeded: [] }; |
| 23 | this.client = config.newClient({ w: 1 }, { maxPoolSize: 1, monitorCommands: true }); |
| 24 | |
| 25 | this.client.on(class="st">'commandStarted', event => { |
| 26 | if (ignoredCommands.indexOf(event.commandName) === -1) { |
| 27 | this.commands.started.push(event); |
| 28 | } |
| 29 | }); |
| 30 | |
| 31 | this.client.on(class="st">'commandSucceeded', event => { |
| 32 | if (ignoredCommands.indexOf(event.commandName) === -1) { |
| 33 | this.commands.succeeded.push(event); |
| 34 | } |
| 35 | }); |
| 36 | |
| 37 | await this.client.connect(); |
| 38 | } |
| 39 | }; |
| 40 | |
| 41 | describe(class="st">'Sessions Spec', function () { |