Node.js 木偶演员Percy脚本未运行

Node.js 木偶演员Percy脚本未运行,node.js,npm,puppeteer,percy,Node.js,Npm,Puppeteer,Percy,JS测试文件。只是尝试运行一个非常基本的percy测试来生成快照,我假设将其在线上传 const puppeteer = require('puppeteer'); const percySnapshot = require('@percy/puppeteer'); describe('Percy Visual Test', () => { let browser; let page; beforeAll(async function () {

JS测试文件。只是尝试运行一个非常基本的percy测试来生成快照,我假设将其在线上传

const puppeteer = require('puppeteer');
const percySnapshot = require('@percy/puppeteer');

describe('Percy Visual Test', () => {
    let browser;
    let page;

    beforeAll(async function () {
        browser = await puppeteer.launch({
            headless: true,
        });
        page = await browser.newPage();
    });

    afterAll(async function () {
        await browser.close();
    });

    test('Full Page Percy Snapshot', async () => {
        await page.goto('https://www.example.com');
        await page.waitForTimeout(1000);
        await percySnapshot(page, 'Example Page');
    });
});

json(我正在使用命令npm runtest:percy

下面是错误消息。我的测试脚本命令有问题吗?下面是我的教程。 在windows上工作。终端的PS

> percy exec -- jest -i './tests-snapshots/__tests__/__image_snapshots__/percy.test.js'

[percy] created build #3: https://percy.io/<>
[percy] percy has started.
No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
In C:\Users\<>\Desktop\Udemy\Puppeteer\pptr-visual\tests-snapshots
  2 files checked.
  testMatch: **/__tests__/**/*.[jt]s?(x), **/?(*.)+(spec|test).[tj]s?(x) - 2 matches
  testPathIgnorePatterns: \\node_modules\\ - 2 matches
  testRegex:  - 0 matches
Pattern: '.\\tests-snapshots\\__tests__\\__image_snapshots__\\percy.test.js' - 0 matches
**[percy] stopping percy...
[percy] waiting for 0 snapshots to complete...**
[percy] done.
[percy] finalized build #3: https://percy.io/<>
**npm ERR! code ELIFECYCLE
npm ERR! errno 1**
npm ERR! pptr-visual@1.0.0 test:percy: `percy exec -- jest -i './tests-snapshots/__tests__/__image_snapshots__/percy.test.js'`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pptr-visual@1.0.0 test:percy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\<>\AppData\Roaming\npm-cache\_logs\2021-05-13T20_45_52_603Z-debug.log
>percy exec--jest-i./tests snapshots/\uuuuu tests\uuuu/\uuuu image\uuuu snapshots\uuuu/percy.test.js'
[percy]创建了构建#3:https://percy.io/
[珀西]珀西已经开始了。
未找到测试,正在退出,代码为1
使用“--passWithNoTests”运行以退出,代码为0
在C:\Users\\Desktop\Udemy\puppeter\pptr visual\tests快照中
检查了2个文件。
测试匹配:*/\\\\\\\/***.[jt]s?(x),***/?(*)+(规范测试)。[tj]s?(x)-2个匹配
testPathIgnorePatterns:\\node\u模块\\-2个匹配项
testRegex:-0个匹配项
模式:'.\\tests snapshots\\\测试\图像\快照\测试\测试.js'-0匹配
**[珀西]阻止珀西。。。
[percy]正在等待0个快照完成**
[珀西]完成了。
[percy]最终版本#3:https://percy.io/
**npm错误!代码失效循环
npm错误!错误1**
npm错误!pptr-visual@1.0.0test:percy:`percy exec--jest-i./tests snapshots/\uuuuuu tests\uuuuu/\uuuu image\u snapshots\uuuuu/percy.test.js'`
npm错误!退出状态1
npm错误!
npm错误!在pptr中失败-visual@1.0.0测试:percy脚本。
npm错误!这可能不是npm的问题。上面可能还有其他日志输出。
npm错误!此运行的完整日志可在以下位置找到:
npm错误!C:\Users\\AppData\Roaming\npm cache\\日志\2021-05-13T20\U 45\U 52\U 603Z-debug.log
> percy exec -- jest -i './tests-snapshots/__tests__/__image_snapshots__/percy.test.js'

[percy] created build #3: https://percy.io/<>
[percy] percy has started.
No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
In C:\Users\<>\Desktop\Udemy\Puppeteer\pptr-visual\tests-snapshots
  2 files checked.
  testMatch: **/__tests__/**/*.[jt]s?(x), **/?(*.)+(spec|test).[tj]s?(x) - 2 matches
  testPathIgnorePatterns: \\node_modules\\ - 2 matches
  testRegex:  - 0 matches
Pattern: '.\\tests-snapshots\\__tests__\\__image_snapshots__\\percy.test.js' - 0 matches
**[percy] stopping percy...
[percy] waiting for 0 snapshots to complete...**
[percy] done.
[percy] finalized build #3: https://percy.io/<>
**npm ERR! code ELIFECYCLE
npm ERR! errno 1**
npm ERR! pptr-visual@1.0.0 test:percy: `percy exec -- jest -i './tests-snapshots/__tests__/__image_snapshots__/percy.test.js'`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pptr-visual@1.0.0 test:percy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\<>\AppData\Roaming\npm-cache\_logs\2021-05-13T20_45_52_603Z-debug.log