diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6bdf3c1..f1d35e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: node-version: ${{ matrix.node-version }} - name: Install dependencies - run: npm i --ignore-scripts + run: npm i - name: Run tests run: npm test diff --git a/test/consumer.test.js b/test/consumer.test.js index b822efb..0731c5d 100644 --- a/test/consumer.test.js +++ b/test/consumer.test.js @@ -13,11 +13,12 @@ const options = { } test('unreachable brokers', t => { - t.plan(2) + t.plan(3) const consumer = new Consumer(options, log, (err) => { t.ok(err) + consumer.on('error', t.ok) + consumer.on('ready', t.error) }, {}, { timeout: 200 }) - consumer.on('ready', t.error) t.after(() => { consumer.stop() }) diff --git a/test/producer.test.js b/test/producer.test.js index 49178bd..4faf5fc 100644 --- a/test/producer.test.js +++ b/test/producer.test.js @@ -19,7 +19,7 @@ test('unreachable brokers', t => { producer.push() }, {}, { timeout: 200 }) t.after(() => { - consumer.stop() + producer.stop() }) })