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

@js-bits/xpromise

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@js-bits/xpromise - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

.github/workflows/npm-publish.yml

1

examples/example1.js
import ExtendablePromise from '../index.js';
// const ExtendablePromise = require('../dist/index.cjs');

@@ -3,0 +4,0 @@ class MyPromise extends ExtendablePromise {

3

examples/example1.test.js

@@ -6,3 +6,3 @@ // eslint-disable-next-line import/no-extraneous-dependencies

beforeEach(() => {
global.console = { log: jest.fn() };
console = { log: jest.fn() };
});

@@ -16,2 +16,3 @@ afterEach(() => {

await import('./example1.js');
// await require('./example1.js');
expect(console.log).toHaveBeenCalledTimes(3);

@@ -18,0 +19,0 @@ expect(console.log.mock.calls[0]).toEqual([true]);

@@ -185,2 +185,8 @@ /* eslint-disable max-classes-per-file */

});
test('should return only first argument', () => {
expect.assertions(1);
return promise.resolve(11, 22, 33).then((...args) => {
expect(args).toEqual([11]);
});
});
describe('when bound to another promise', () => {

@@ -356,2 +362,9 @@ test('should return resolved promise', async () => {

});
test('should return only first argument', () => {
expect.assertions(1);
const promise = Promise.resolve(1, 2, 3);
return promise.then((...args) => {
expect(args).toEqual([1]);
});
});
});

@@ -358,0 +371,0 @@ describe('Promise.reject', () => {

{
"name": "@js-bits/xpromise",
"version": "0.3.0",
"version": "0.3.1",
"description": "Extendable Promise",

@@ -36,9 +36,9 @@ "keywords": [

"devDependencies": {
"@js-bits/formalinter": "^0.3.1",
"@js-bits/formalinter": "^1.0.3",
"@js-bits/log-in-color": "^0.3.1",
"@types/jest": "^29.1.1",
"husky": "^8.0.1",
"jest": "^29.1.2",
"jest-environment-jsdom": "^29.1.2",
"rollup": "^2.79.1"
"@types/jest": "^29.5.1",
"husky": "^8.0.3",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"rollup": "^3.23.0"
},

@@ -65,4 +65,4 @@ "engines": {

"dependencies": {
"@js-bits/enumerate": "^0.8.0"
"@js-bits/enumerate": "^0.10.0"
}
}

@@ -51,3 +51,2 @@ # Extendable Promise

- Does not include any polyfills, which means that Internet Explorer is not supported.
- [Alternative solution](https://stackoverflow.com/questions/48158730/extend-javascript-promise-and-resolve-or-reject-it-inside-constructor)

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