reworked app screens and added vibration
This commit is contained in:
+16
-10
@@ -25,16 +25,22 @@ test('default server socket uses the local Wegwichtel endpoint', async () => {
|
||||
assert.doesNotMatch(apiSource, /instance:/);
|
||||
});
|
||||
|
||||
test('retired internal instance label is absent from the project', async () => {
|
||||
const files = [
|
||||
'.env.example',
|
||||
'README.md',
|
||||
'server.js',
|
||||
'src/config.js',
|
||||
'src/routes/api.js',
|
||||
'public/index.html'
|
||||
];
|
||||
const content = (await Promise.all(files.map(read))).join('\n');
|
||||
test('retired internal instance label is absent from authored project files', async () => {
|
||||
const extensions = new Set(['.js', '.json', '.md', '.html', '.css', '.env', '.sql', '.gpx', '.svg']);
|
||||
const ignoredDirectories = new Set(['node_modules', 'vendor', '.git']);
|
||||
const files = [];
|
||||
|
||||
async function collect(directory) {
|
||||
for (const entry of await fs.readdir(directory, { withFileTypes: true })) {
|
||||
if (entry.isDirectory() && ignoredDirectories.has(entry.name)) continue;
|
||||
const absolute = path.join(directory, entry.name);
|
||||
if (entry.isDirectory()) await collect(absolute);
|
||||
else if (extensions.has(path.extname(entry.name)) || entry.name === '.env.example') files.push(absolute);
|
||||
}
|
||||
}
|
||||
|
||||
await collect(root);
|
||||
const content = (await Promise.all(files.map(file => fs.readFile(file, 'utf8')))).join('\n');
|
||||
const retiredLabel = ['at', 'las'].join('');
|
||||
assert.doesNotMatch(content, new RegExp(retiredLabel, 'i'));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user