import { describe, it, expect } from 'vitest'; import { watch } from "node:fs" import * as readline from "node:readline" // TODO: make tests for Database describe('watch nginx', () => { const OPTIONS = { recursive: true } const NGINX_BASE = "/etc/nginx" const input = readline.createInterface({ input: process.stdin, output: process.stdout, }) watch(NGINX_BASE, OPTIONS, (eventType, filename) => { console.log(`event: ${eventType}`) console.log(`file: ${filename}`) }) console.log("Done") });