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

@khanacademy/perseus-core

Package Overview
Dependencies
Maintainers
1
Versions
301
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@khanacademy/perseus-core - npm Package Compare versions

Comparing version 0.0.0-PR745-20231004184900 to 0.0.0-PR745-20231004195820

2

CHANGELOG.md
# @khanacademy/perseus-core
## 0.0.0-PR745-20231004184900
## 0.0.0-PR745-20231004195820

@@ -5,0 +5,0 @@ ### Patch Changes

@@ -6,3 +6,3 @@ {

"license": "MIT",
"version": "0.0.0-PR745-20231004184900",
"version": "0.0.0-PR745-20231004195820",
"publishConfig": {

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

@@ -9,4 +9,8 @@ import {addLibraryVersionToPerseusDebug} from "./add-library-version-to-perseus-debug";

it("should add the given library to __perseus_debug__", () => {
// Array
// Act
addLibraryVersionToPerseusDebug("test-lib", "1.0.0");
// Assert
expect(globalThis.__perseus_debug__).toMatchInlineSnapshot(`

@@ -20,2 +24,5 @@ {

it("should extend __perseus_debug__ when multiple libraries registered", () => {
// Arrange
// Act
addLibraryVersionToPerseusDebug("test-lib", "1.0.0");

@@ -25,2 +32,3 @@ addLibraryVersionToPerseusDebug("sample-lib", "2.0.0");

// Assert
expect(globalThis.__perseus_debug__).toMatchInlineSnapshot(`

@@ -36,2 +44,6 @@ {

it("should convert library entry to array when multiple versions of the same library registered", () => {
// Arrange
jest.spyOn(console, "warn").mockImplementation();
// Act
addLibraryVersionToPerseusDebug("test-lib", "1.0.1");

@@ -42,2 +54,3 @@ addLibraryVersionToPerseusDebug("test-lib", "4.1.8");

// Assert
expect(globalThis.__perseus_debug__).toMatchInlineSnapshot(`

@@ -56,4 +69,6 @@ {

it("should warn when multiple versions of the same library registered", () => {
const warnSpy = jest.spyOn(console, "warn");
// Arrange
const warnSpy = jest.spyOn(console, "warn").mockImplementation();
// Act
addLibraryVersionToPerseusDebug("test-lib", "1.0.1");

@@ -64,2 +79,3 @@ addLibraryVersionToPerseusDebug("test-lib", "4.1.8");

// Assert
expect(warnSpy).toHaveBeenCalledWith(

@@ -73,2 +89,5 @@ expect.stringMatching(

it("should not register duplicates for duplicate calls of the same library and version", () => {
// Arrange
// Act
addLibraryVersionToPerseusDebug("test-lib", "1.0.0");

@@ -78,2 +97,3 @@ addLibraryVersionToPerseusDebug("test-lib", "1.0.0");

// Assert
expect(globalThis.__perseus_debug__).toMatchInlineSnapshot(`

@@ -87,4 +107,6 @@ {

it("should not warn for duplicate calls for a library of the same library and version", () => {
const warnSpy = jest.spyOn(console, "warn");
// Arrange
const warnSpy = jest.spyOn(console, "warn").mockImplementation();
// Act
addLibraryVersionToPerseusDebug("test-lib", "1.0.0");

@@ -94,4 +116,5 @@ addLibraryVersionToPerseusDebug("test-lib", "1.0.0");

// Assert
expect(warnSpy).not.toHaveBeenCalled();
});
});
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