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

@web/test-runner-commands

Package Overview
Dependencies
Maintainers
7
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web/test-runner-commands - npm Package Compare versions

Comparing version 0.5.2 to 0.5.3

6

CHANGELOG.md
# @web/test-runner-commands
## 0.5.3
### Patch Changes
- 3af6ff86: improve snapshot formatting
## 0.5.2

@@ -4,0 +10,0 @@

8

dist/snapshotPlugin.js

@@ -76,7 +76,7 @@ "use strict";

const snapshotPath = getSnapshotPath(testFilePath);
const startMarker = `// snapshot ${name}`;
const nameStr = JSON.stringify(name);
const startMarker = `snapshots[${nameStr}]`;
const endMarker = `// end snapshot ${name}\n\n`;
const nameStr = JSON.stringify(name);
const replacement = updatedSnapshot
? `${startMarker}\nsnapshots[${nameStr}] = \`${updatedSnapshot}\`;\n${endMarker}`
? `${startMarker} = \n\`${updatedSnapshot}\`;\n${endMarker}`
: '';

@@ -101,3 +101,3 @@ const content = await this.get(snapshotPath);

this.snapshots.set(snapshotPath, updatedContent);
if (updatedContent.includes('// snapshot')) {
if (updatedContent.includes('// end snapshot')) {
// update or create snapshot

@@ -104,0 +104,0 @@ const fileDir = path_1.default.dirname(snapshotPath);

{
"name": "@web/test-runner-commands",
"version": "0.5.2",
"version": "0.5.3",
"publishConfig": {

@@ -5,0 +5,0 @@ "access": "public"

@@ -84,7 +84,7 @@ /* eslint-disable @typescript-eslint/no-empty-function */

const snapshotPath = getSnapshotPath(testFilePath);
const startMarker = `// snapshot ${name}`;
const nameStr = JSON.stringify(name);
const startMarker = `snapshots[${nameStr}]`;
const endMarker = `// end snapshot ${name}\n\n`;
const nameStr = JSON.stringify(name);
const replacement = updatedSnapshot
? `${startMarker}\nsnapshots[${nameStr}] = \`${updatedSnapshot}\`;\n${endMarker}`
? `${startMarker} = \n\`${updatedSnapshot}\`;\n${endMarker}`
: '';

@@ -113,3 +113,3 @@

this.snapshots.set(snapshotPath, updatedContent);
if (updatedContent.includes('// snapshot')) {
if (updatedContent.includes('// end snapshot')) {
// update or create snapshot

@@ -116,0 +116,0 @@ const fileDir = path.dirname(snapshotPath);

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