From 66a364358a571deffaad27e4adf5c971db5d560a Mon Sep 17 00:00:00 2001 From: Feng Yu Date: Fri, 6 May 2022 22:57:19 +0800 Subject: [PATCH 1/2] chore: upgrade developmemt node version to v16 (#5167) Co-authored-by: yufeng.freeman --- .node-version | 2 +- docs/CONTRIBUTING.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.node-version b/.node-version index 8351c1939..b6a7d89c6 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -14 +16 diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index c12ff3020..0474de614 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -31,7 +31,7 @@ for [VS Code](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#prerequisites). Here is what is needed: -- `node` v14.x +- `node` v16.x - `git` v2.x or greater - [`git-lfs`](https://git-lfs.github.com) - [`yarn`](https://classic.yarnpkg.com/en/) From 5a5798e45f6bf79fccaaa1354af428cfe241178e Mon Sep 17 00:00:00 2001 From: Joe Previte Date: Fri, 6 May 2022 09:51:44 -0700 Subject: [PATCH 2/2] fix(update): add OrEqual to update.checked test (#5171) * fix(update): add OrEqual to update.checked test * fixup!: change all instances to OrEqual * fixup!: add missing equals * fixup!: consistency --- test/unit/node/update.test.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/unit/node/update.test.ts b/test/unit/node/update.test.ts index 9aa6f75d7..d315e977c 100644 --- a/test/unit/node/update.test.ts +++ b/test/unit/node/update.test.ts @@ -131,7 +131,8 @@ describe("update", () => { await expect(settings().read()).resolves.toEqual({ update }) expect(isNaN(update.checked)).toEqual(false) - expect(update.checked < Date.now() && update.checked >= now).toEqual(true) + expect(update.checked).toBeGreaterThanOrEqual(now) + expect(update.checked).toBeLessThanOrEqual(Date.now()) expect(update.version).toStrictEqual("2.1.0") expect(spy).toEqual(["/latest"]) }) @@ -145,7 +146,7 @@ describe("update", () => { await expect(settings().read()).resolves.toEqual({ update }) expect(isNaN(update.checked)).toStrictEqual(false) - expect(update.checked).toBeLessThan(now) + expect(update.checked).toBeLessThanOrEqual(now) expect(update.version).toStrictEqual("2.1.0") expect(spy).toEqual([]) }) @@ -160,7 +161,7 @@ describe("update", () => { await expect(settings().read()).resolves.toEqual({ update }) expect(isNaN(update.checked)).toStrictEqual(false) expect(update.checked).toBeGreaterThanOrEqual(now) - expect(update.checked).toBeLessThan(Date.now()) + expect(update.checked).toBeLessThanOrEqual(Date.now()) expect(update.version).toStrictEqual("4.1.1") expect(spy).toStrictEqual(["/latest"]) }) @@ -206,7 +207,7 @@ describe("update", () => { let update = await provider.getUpdate(true) expect(isNaN(update.checked)).toStrictEqual(false) expect(update.checked).toBeGreaterThanOrEqual(now) - expect(update.checked).toBeLessThan(Date.now()) + expect(update.checked).toBeLessThanOrEqual(Date.now()) expect(update.version).toStrictEqual("unknown") provider = new UpdateProvider("http://probably.invalid.dev.localhost/latest", settings()) @@ -214,7 +215,7 @@ describe("update", () => { update = await provider.getUpdate(true) expect(isNaN(update.checked)).toStrictEqual(false) expect(update.checked).toBeGreaterThanOrEqual(now) - expect(update.checked).toBeLessThan(Date.now()) + expect(update.checked).toBeLessThanOrEqual(Date.now()) expect(update.version).toStrictEqual("unknown") })