dev.test.ts18 lines · main
| 1 | import { test } from 'node:test'; |
| 2 | import { strict as assert } from 'node:assert'; |
| 3 | import { shouldPromptForDiff } from './dev.js'; |
| 4 | |
| 5 | test('free tier: never prompts on non-destructive', () => { |
| 6 | assert.equal(shouldPromptForDiff({ tier: 'free', destructive: false }), false); |
| 7 | }); |
| 8 | test('free tier: prompts on destructive', () => { |
| 9 | assert.equal(shouldPromptForDiff({ tier: 'free', destructive: true }), true); |
| 10 | }); |
| 11 | test('pro tier: prompts on every change', () => { |
| 12 | assert.equal(shouldPromptForDiff({ tier: 'pro', destructive: false }), true); |
| 13 | assert.equal(shouldPromptForDiff({ tier: 'pro', destructive: true }), true); |
| 14 | }); |
| 15 | test('team tier: prompts on every change', () => { |
| 16 | assert.equal(shouldPromptForDiff({ tier: 'team', destructive: false }), true); |
| 17 | assert.equal(shouldPromptForDiff({ tier: 'team', destructive: true }), true); |
| 18 | }); |