PluginProbe
Simple Analytics / 1.113
Simple Analytics v1.113
1.113 1.112 1.111 1.110 1.109 1.108 1.107 1.106 1.73 1.74 1.75 1.76 1.77 1.78 1.79 1.8 1.80 1.81 1.82 1.83 1.84 1.85 1.86 1.87 1.88 All 102 releases
simpleanalytics / tests / Browser / phpRegression.spec.ts

phpRegression.spec.ts in Simple Analytics 1.113, at tests/Browser/phpRegression.spec.ts

17 lines 785 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { test, expect } from '@playwright/test';
2 import { execFileSync } from 'node:child_process';
3 import { readdirSync } from 'node:fs';
4 import { basename, resolve } from 'node:path';
5
6 // Each script uses its own temporary options table, so these checks can run
7 // alongside browser tests without changing their WordPress settings.
8 for (const file of readdirSync(resolve('tests/Regression')).filter(name => name.endsWith('.php'))) {
9 test(`WordPress regression: ${file}`, () => {
10 const output = execFileSync(resolve('node_modules/.bin/wp-env'), [
11 'run', 'cli', 'wp', 'eval-file',
12 `wp-content/plugins/${basename(process.cwd())}/tests/Regression/${file}`,
13 ], { encoding: 'utf8', timeout: 45000 });
14 expect(output).toContain('Regression checks passed');
15 });
16 }
17