This is just a technology testing project based on Create React App and TailwindCSS
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

30 行
814B

  1. const config = require('./config');
  2. const { setWorldConstructor } = require('@cucumber/cucumber');
  3. const puppeteer = require('puppeteer');
  4. const scope = require('./support/scope');
  5. const express = require('express');
  6. const httpShutdown = require('http-shutdown');
  7. const path = require('path');
  8. const app = express();
  9. app.use(express.static(path.join(__dirname, '..', 'build')));
  10. app.get('/', (req, res)=> {
  11. res.sendFile(path.join(__dirname, '..', 'build', 'index.html'));
  12. })
  13. const web = httpShutdown(app.listen(config.port, () => {
  14. console.log(`Web is listening on port ${config.port}`);
  15. }));
  16. web.host = `http://localhost:${config.port}`;
  17. const World = function () {
  18. scope.host = web.host;
  19. scope.driver = puppeteer;
  20. scope.context = {};
  21. scope.web = web;
  22. };
  23. setWorldConstructor(World);