Skip to content

Commit

Permalink
allow running in single-test mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerivec committed Jan 9, 2025
1 parent f2b450a commit 6f8d6de
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/settings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,14 @@ describe('Settings', () => {
});

it('Ensures configuration.example.yaml is never out of sync with settings', () => {
const exampleYaml = read('../data/configuration.example.yaml') as Record<string, unknown>;
let path = './data/configuration.example.yaml';

// allow running in single-test mode
if (!fs.existsSync('./data')) {
path = '../data/configuration.example.yaml';
}

const exampleYaml = read(path) as Record<string, unknown>;

// force keeping an eye on example yaml whenever CURRENT_VERSION changes
expect(exampleYaml).toStrictEqual({
Expand Down

0 comments on commit 6f8d6de

Please sign in to comment.