Skip to content

Commit

Permalink
chore: add renovate config (#3)
Browse files Browse the repository at this point in the history
* chore: add renovate config

* update
  • Loading branch information
ivan-tymoshenko authored Mar 14, 2024
1 parent e78268d commit 189dac8
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"homepage": "https://github.com/platformatic/tail-file-stream#readme",
"devDependencies": {
"@types/node": "^20.11.26",
"@matteo.collina/tspl": "^0.1.1",
"c8": "^9.1.0",
"standard": "^17.1.0",
"tsd": "^0.30.7"
Expand Down
15 changes: 15 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:base"],
"packageRules": [
{
"groupName": "Safe automerge",
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
"automerge": true
}
],
"lockFileMaintenance": {
"enabled": true,
"automerge": true
}
}
15 changes: 7 additions & 8 deletions test/open.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,25 @@
const assert = require('node:assert')
const { test } = require('node:test')
const { join } = require('node:path')
const { tspl } = require('@matteo.collina/tspl')
const { createReadStream } = require('..')

test('should open a file', (t, done) => {
const { strictEqual, ok } = tspl(t, { plan: 2 })

const pathToFile = join(__dirname, 'files', 'test-file-1.txt')
const stream = createReadStream(pathToFile, { autoWatch: false })

let openEmitted = false
stream.on('open', (fd) => {
openEmitted = true
assert.strictEqual(typeof fd, 'number')
strictEqual(typeof fd, 'number')
})

let readyEmitted = false
stream.on('ready', () => {
readyEmitted = true
ok(true)
})

setImmediate(() => {
assert.strictEqual(openEmitted, true)
assert.strictEqual(readyEmitted, true)
stream.on('data', () => {
stream.destroy()
done()
})
})
Expand Down

0 comments on commit 189dac8

Please sign in to comment.