mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
search for test files instead of explicitly name them
This commit is contained in:
parent
94fa8a6534
commit
18d2fb81a7
@ -1,3 +1,4 @@
|
||||
import { readdir } from 'fs/promises';
|
||||
import * as path from 'path';
|
||||
|
||||
class Test {
|
||||
@ -57,7 +58,8 @@ export class Context {
|
||||
|
||||
export async function run(): Promise<void> {
|
||||
const context = new Context();
|
||||
const testFiles = ["launch_config.test.js", "runnable_env.test.js"];
|
||||
|
||||
const testFiles = (await readdir(path.resolve(__dirname))).filter(name => name.endsWith('.test.js'));
|
||||
for (const testFile of testFiles) {
|
||||
try {
|
||||
const testModule = require(path.resolve(__dirname, testFile));
|
||||
|
Loading…
x
Reference in New Issue
Block a user