Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mands/nx-playwright

Package Overview
Dependencies
Maintainers
5
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mands/nx-playwright - npm Package Compare versions

Comparing version 0.1.29 to 0.1.30

2

package.json
{
"name": "@mands/nx-playwright",
"version": "0.1.29",
"version": "0.1.30",
"license": "MIT",

@@ -5,0 +5,0 @@ "publishConfig": {

@@ -49,3 +49,9 @@ "use strict";

.catch((error) => {
console.error('Unexpected error', error);
const message = error.stdout || error.stderr;
if (message) {
console.error(`Playwright errors ${message}`);
}
else {
console.error('Unexpected error', error);
}
return false;

@@ -52,0 +58,0 @@ });

@@ -119,3 +119,31 @@ import utilModule from 'util';

it('fails gracefully when command fails', async () => {
it('logs error when command fails with stdout', async () => {
const error = new Error('fake error') as Error & { stdout: string };
error.stdout = '\nRunning 3 tests using 1 worker\n...';
promisify.mockReturnValueOnce(jest.fn().mockRejectedValueOnce(error));
const { success } = await executor(options, context);
expect(success).toBe(false);
expect(console.error).toHaveBeenCalledTimes(1);
expect(console.error).toHaveBeenCalledWith(
`Playwright errors \nRunning 3 tests using 1 worker\n...`,
);
});
it('logs error when command fails with stderr', async () => {
const error = new Error('fake error') as Error & { stderr: string };
error.stderr = '\nFailure message';
promisify.mockReturnValueOnce(jest.fn().mockRejectedValueOnce(error));
const { success } = await executor(options, context);
expect(success).toBe(false);
expect(console.error).toHaveBeenCalledTimes(1);
expect(console.error).toHaveBeenCalledWith(`Playwright errors \nFailure message`);
});
it('fails gracefully when command fails without stdout or stderr', async () => {
const error = new Error('fake error');

@@ -122,0 +150,0 @@ promisify.mockReturnValueOnce(jest.fn().mockRejectedValueOnce(error));

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc