New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

parse-mockdb

Package Overview
Dependencies
Maintainers
3
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-mockdb

Parse JS SDK Mocked Database

  • 0.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.4K
decreased by-44.54%
Maintainers
3
Weekly downloads
 
Created
Source

Parse MockDB

Master Build Status: Circle CI

Provides a mocked Parse RESTController compatible with version 2.0+ of the JavaScript SDK.

Installation and Usage

npm install parse-mockdb --save-dev
'use strict';
const Parse = require('parse-shim');
const ParseMockDB = require('parse-mockdb');

ParseMockDB.mockDB(Parse); // Mock the Parse RESTController

// Perform saves, queries, updates, deletes, etc... using the Parse JS SDK

ParseMockDB.cleanUp(); // Clear the Database
ParseMockDB.unMockDB(); // Un-mock the Parse RESTController

Completeness

  • Basic CRUD (save, destroy, fetch)
  • Query operators ($exists, $in, $nin, $eq, $ne, $lt, $lte, $gt, $gte, $regex, $select, $inQuery, $all, $nearSphere)
  • Update operators (Increment, Add, AddUnique, Remove, Delete)
  • Parse.Relation (AddRelation, RemoveRelation)
  • Parse query dotted notation matching eg { "name.first": "Tyler" })
  • Parse class level permissions
  • Parse.ACL (row level permissions)
  • Parse special classes (Parse.User, Parse.Role, ...)
  • Parse lifecycle hooks (beforeSave - done, afterSave - done, beforeDelete - done, afterDelete)

Changelog

v0.4.0

  • Breaking Change This library is now targeting the 2.x series of the Parse JS SDK. If you are using Parse 1.6+, you should pin to the v0.3.x release.
v0.3.0
  • Breaking Change When calling mockDB() you must now pass in a reference to the Parse SDK that you want to mock.

  • Breaking Change Stopped patching MockDB object on to Parse module. You can no longer access Parse.MockDB, you must load the parse-mockdb module explicitly.

  • Breaking Change Removed ParseMockDB.promiseResultSync method

Tests

npm test

Keywords

FAQs

Package last updated on 09 Mar 2020

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