background-step-registry.test.js 500 B

1234567891011
  1. const test = require('node:test');
  2. const assert = require('node:assert/strict');
  3. const fs = require('node:fs');
  4. test('background imports step registry and shared step definitions', () => {
  5. const source = fs.readFileSync('background.js', 'utf8');
  6. assert.match(source, /background\/steps\/registry\.js/);
  7. assert.match(source, /data\/step-definitions\.js/);
  8. assert.match(source, /MultiPageStepDefinitions\?\.getSteps/);
  9. assert.match(source, /stepRegistry\.executeStep\(step,\s*state\)/);
  10. });