Skip to content

Commit

Permalink
Merge pull request #28 from adRise/jest_upgrade
Browse files Browse the repository at this point in the history
upgrade jest + bump version + rebuild build/dest.js
  • Loading branch information
zhiyelee authored Feb 22, 2024
2 parents b344eb7 + ed5b261 commit 1dc4248
Show file tree
Hide file tree
Showing 5 changed files with 1,656 additions and 1,722 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
coverage
debug.local.js
logs
142 changes: 94 additions & 48 deletions dest/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1461,7 +1461,7 @@ exports.Octokit = Octokit;

Object.defineProperty(exports, "__esModule", ({ value: true }));

var isPlainObject = __nccwpck_require__(287);
var isPlainObject = __nccwpck_require__(558);
var universalUserAgent = __nccwpck_require__(429);

function lowercaseKeys(object) {
Expand Down Expand Up @@ -1849,6 +1849,52 @@ exports.endpoint = endpoint;
//# sourceMappingURL=index.js.map


/***/ }),

/***/ 558:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({ value: true }));

/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/

function isObject(o) {
return Object.prototype.toString.call(o) === '[object Object]';
}

function isPlainObject(o) {
var ctor,prot;

if (isObject(o) === false) return false;

// If has modified constructor
ctor = o.constructor;
if (ctor === undefined) return true;

// If has modified prototype
prot = ctor.prototype;
if (isObject(prot) === false) return false;

// If constructor does not have an Object-specific method
if (prot.hasOwnProperty('isPrototypeOf') === false) {
return false;
}

// Most likely a plain Object
return true;
}

exports.isPlainObject = isPlainObject;


/***/ }),

/***/ 668:
Expand Down Expand Up @@ -3336,7 +3382,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau

var endpoint = __nccwpck_require__(440);
var universalUserAgent = __nccwpck_require__(429);
var isPlainObject = __nccwpck_require__(287);
var isPlainObject = __nccwpck_require__(62);
var nodeFetch = _interopDefault(__nccwpck_require__(467));
var requestError = __nccwpck_require__(537);

Expand Down Expand Up @@ -3478,6 +3524,52 @@ exports.request = request;
//# sourceMappingURL=index.js.map


/***/ }),

/***/ 62:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({ value: true }));

/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/

function isObject(o) {
return Object.prototype.toString.call(o) === '[object Object]';
}

function isPlainObject(o) {
var ctor,prot;

if (isObject(o) === false) return false;

// If has modified constructor
ctor = o.constructor;
if (ctor === undefined) return true;

// If has modified prototype
prot = ctor.prototype;
if (isObject(prot) === false) return false;

// If constructor does not have an Object-specific method
if (prot.hasOwnProperty('isPrototypeOf') === false) {
return false;
}

// Most likely a plain Object
return true;
}

exports.isPlainObject = isPlainObject;


/***/ }),

/***/ 682:
Expand Down Expand Up @@ -3683,52 +3775,6 @@ class Deprecation extends Error {
exports.Deprecation = Deprecation;


/***/ }),

/***/ 287:
/***/ ((__unused_webpack_module, exports) => {

"use strict";


Object.defineProperty(exports, "__esModule", ({ value: true }));

/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/

function isObject(o) {
return Object.prototype.toString.call(o) === '[object Object]';
}

function isPlainObject(o) {
var ctor,prot;

if (isObject(o) === false) return false;

// If has modified constructor
ctor = o.constructor;
if (ctor === undefined) return true;

// If has modified prototype
prot = ctor.prototype;
if (isObject(prot) === false) return false;

// If constructor does not have an Object-specific method
if (prot.hasOwnProperty('isPrototypeOf') === false) {
return false;
}

// Most likely a plain Object
return true;
}

exports.isPlainObject = isPlainObject;


/***/ }),

/***/ 467:
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "update-pr-branch",
"version": "0.1.1",
"version": "0.1.2",
"description": "Automatically update PR branch",
"main": "dest/index.js",
"scripts": {
Expand All @@ -21,6 +21,6 @@
"@vercel/ncc": "^0.27.0",
"babel-jest": "^26.6.3",
"eslint": "^8.5.0",
"jest": "^26.6.3"
"jest": "^29.7.0"
}
}
4 changes: 2 additions & 2 deletions src/lib/util.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ describe('wait()', () => {
const fn = jest.fn();
utils.wait(100).then(fn);

jest.runTimersToTime(50);
jest.advanceTimersByTime(50);
await Promise.resolve();
expect(fn).not.toHaveBeenCalled();

jest.runTimersToTime(50);
jest.advanceTimersByTime(50);
await Promise.resolve();
expect(fn).toHaveBeenCalledTimes(1);
});
Expand Down
Loading

0 comments on commit 1dc4248

Please sign in to comment.