npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@organicdesign/crdt-tests

v0.4.1

Published

Tests for CRDTs implementing crdt-interfaces.

Downloads

7

Readme

crdt-tests

Tests for CRDTs implementing @organicdesign/crdt-interfaces.

Table of Contents

Install

npm i --save-dev @organicdesign/crdt-tests

Usage

To use a test you just need to import the relevant test method and call it on a CRDT implementation. If you are testing against a specific CRDT (for example G-Counter) then you do not need to test against the general CRDT tests since those are included in the specific tests. The general tests are to assist with the creation of abitrary CRDTs that may not have a specific test ready for them.

Most of these tests are created for implementations that use arbitrary data types, if the implementation is for a specific data type then a specific test should also be created for it.

Tests

CRDT

import { createCRDTTest } from "@organicdesign/crdt-tests";

This test is a general CRDT test for CRDTs conforming to the CRDT interface. This will check that functionality of it works.

Sync

import { createSyncronizeTest } from "@organicdesign/crdt-tests";

This test checks that the synchronization functionality of a CRDT works.

Broadcast

import { createBroadcastTest } from "@organicdesign/crdt-tests";

This test checks that the broadcast functionality of a CRDT works, given that the CRDT implements this optional feature.

Serialize

import { createSerializeTest } from "@organicdesign/crdt-tests";

This test checks the the serialization functionality of a CRDT works give that the CRDT implements this optional feature.

G-Counter

Status: Basic

import { createGCounterTest } from "@organicdesign/crdt-tests";

This test is for a G-Counter CRDT that implements the CRDT & MCounter interfaces.

PN-Counter

Status: Basic

import { createPNCounterTest } from "@organicdesign/crdt-tests";

This test is for a PN-Counter CRDT that implements the CRDT & BCounter interfaces.

G-Set

Status: Incomplete

import { createGSetTest } from "@organicdesign/crdt-tests";

This test is for a G-Set CRDT that implements the CRDT & MSet interfaces.

MV-Register

Status: Incomplete

import { createMVRegisterTest } from "@organicdesign/crdt-tests";

This test is for a MV-Register CRDT that implements the CRDT & MVRegister interfaces.

LWW-Register

Status: Incomplete

import { createLWWRegisterTest } from "@organicdesign/crdt-tests";

This test is for a LWW-Register CRDT that implements the CRDT & BRegister interfaces.

LWW-Map

Status: Incomplete

import { createLWWMapTest } from "@organicdesign/crdt-tests";

This test is for a LWW-Map CRDT that implements the CRDT & BMap interfaces.

CRDT-Map

Status: Incomplete

import { createLWWMapTest } from "@organicdesign/crdt-tests";

This test is for a CRDT-Map CRDT that implements the CRDT & MMap interfaces.

To-Do

This package contains basic testing systems for CRDTs but there probably are better ways to setup the tests (espicially after the interfaces version 4.0.0 change), contribution would be most welcome to improve these tests.

Module tests:

  • [ ] Synchronizer tests.
  • [ ] Serializer tests.
  • [ ] Broadcaster tests.

Type tests:

  • [ ] MV-Register register specific methods tests.
  • [ ] G-Set set specific methods tests.
  • [ ] LWW-Register register specific methods tests.
  • [ ] LWW-Map map specific methods tests.
  • [ ] CRDT-Map map specific methods tests.
  • [ ] MV-Register type specific tests.
  • [ ] G-Counter type specific tests.
  • [ ] PN-Counter type specific tests.
  • [ ] G-Set type specific tests.
  • [ ] LWW-Register type specific tests.
  • [ ] LWW-Map type specific tests.
  • [ ] CRDT-Map type specific tests.

Other:

  • [ ] Custom logger.