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

@areyes-studio/meta-spark-jest-mocks

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@areyes-studio/meta-spark-jest-mocks

Jest mocks for Meta Spark Studio modules

  • 1.0.0
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Meta Spark Jest Mocks

This package provides Jest mocks for the modules used in Meta Spark Studio.

Installation

You can install this package using npm:

npm install @areyes.studio/meta-spark-jest-mocks --save-dev

Usage

Import the mocks into your test files and use them to mock the Meta Spark Studio modules:

import { ReactiveMock, ScalarSignalMock } from "@areyes-studio/meta-spark-jest-mocks";

test('Check vector method', async () => {
    let x = new ScalarSignalMock(0);
    let vector = ReactiveMock.vector(x, 0, 0);

    expect(vector.x.pinLastValue()).toBe(0);
    expect(vector.y.pinLastValue()).toBe(0);
    
    await x.mockUpdate(1);

    expect(vector.x.pinLastValue()).toBe(1);
    expect(vector.y.pinLastValue()).toBe(0);
});

You can modify these mocks as needed to fit your specific testing requirements.

License

This package is licensed under the MIT License.

FAQs

Package last updated on 14 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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