/** * The command example, broken in turn: * `pnpm mutate examples/widgets/test/command.mutations.ts` checks that a test * fails for every one. */ const tests = ['examples/widgets/test/command.test.ts'] export default [ { name: 'the filter matches everything', edits: [ { file: '../src/command/app.ts', find: "return needle === ''\n ? COMMANDS\n : COMMANDS.filter(command => command.label.toLocaleLowerCase().includes(needle))", replace: 'return COMMANDS', }, ], tests, }, { name: 'typing rewrites nothing', edits: [ { file: '../src/command/app.ts', find: 'Queried: message => ({ model: modifyFields(model, { query: () => message.text }) }),', replace: 'Queried: () => ({ model }),', }, ], tests, }, { name: 'Enter picks nothing', edits: [ { file: '../src/command/app.ts', find: 'Committed: ({ id }) => SelPlaced.helpers.activate(id)(model),', replace: 'Committed: () => ({ model }),', }, ], tests, }, ]