From 355e80d420a1461cb114a1f28cbde9c5835425ff Mon Sep 17 00:00:00 2001 From: Reputable2722 <153411261+Reputable2772@users.noreply.github.com> Date: Sat, 20 Jul 2024 20:13:11 +0530 Subject: [PATCH] tests: modify vscode tests Signed-off-by: Reputable2722 <153411261+Reputable2772@users.noreply.github.com> --- tests/modules/programs/vscode/keybindings.nix | 14 ++++++++------ tests/modules/programs/vscode/snippets.nix | 11 ++++++++--- tests/modules/programs/vscode/tasks.nix | 14 ++++++++------ tests/modules/programs/vscode/update-checks.nix | 11 ++++++++--- 4 files changed, 32 insertions(+), 18 deletions(-) diff --git a/tests/modules/programs/vscode/keybindings.nix b/tests/modules/programs/vscode/keybindings.nix index 429b59079..a0d3ea93f 100644 --- a/tests/modules/programs/vscode/keybindings.nix +++ b/tests/modules/programs/vscode/keybindings.nix @@ -75,12 +75,14 @@ let in { programs.vscode = { enable = true; - defaultProfile.keybindings = bindings; - profiles = [{ - name = "test"; - keybindings = bindings; - }]; - package = pkgs.writeScriptBin "vscode" "" // { pname = "vscode"; }; + profiles = { + default.keybindings = bindings; + test.keybindings = bindings; + }; + package = pkgs.writeScriptBin "vscode" "" // { + pname = "vscode"; + version = "1.75.0"; + }; }; nmt.script = '' diff --git a/tests/modules/programs/vscode/snippets.nix b/tests/modules/programs/vscode/snippets.nix index cfd9540e0..7d024fed3 100644 --- a/tests/modules/programs/vscode/snippets.nix +++ b/tests/modules/programs/vscode/snippets.nix @@ -66,9 +66,14 @@ let in { programs.vscode = { enable = true; - package = pkgs.writeScriptBin "vscode" "" // { pname = "vscode"; }; - defaultProfile = snippets; - profiles = [ ({ name = "test"; } // snippets) ]; + package = pkgs.writeScriptBin "vscode" "" // { + pname = "vscode"; + version = "1.75.0"; + }; + profiles = { + default = snippets; + test = snippets; + }; }; nmt.script = '' diff --git a/tests/modules/programs/vscode/tasks.nix b/tests/modules/programs/vscode/tasks.nix index 8f91805cd..f7b266a33 100644 --- a/tests/modules/programs/vscode/tasks.nix +++ b/tests/modules/programs/vscode/tasks.nix @@ -37,12 +37,14 @@ let in { programs.vscode = { enable = true; - package = pkgs.writeScriptBin "vscode" "" // { pname = "vscode"; }; - defaultProfile.userTasks = tasks; - profiles = [{ - name = "test"; - userTasks = tasks; - }]; + package = pkgs.writeScriptBin "vscode" "" // { + pname = "vscode"; + version = "1.75.0"; + }; + profiles = { + default.userTasks = tasks; + test.userTasks = tasks; + }; }; nmt.script = '' diff --git a/tests/modules/programs/vscode/update-checks.nix b/tests/modules/programs/vscode/update-checks.nix index 1547bd36a..b75cda566 100644 --- a/tests/modules/programs/vscode/update-checks.nix +++ b/tests/modules/programs/vscode/update-checks.nix @@ -17,9 +17,14 @@ let in { programs.vscode = { enable = true; - package = pkgs.writeScriptBin "vscode" "" // { pname = "vscode"; }; - enableUpdateCheck = false; - enableExtensionUpdateCheck = false; + package = pkgs.writeScriptBin "vscode" "" // { + pname = "vscode"; + version = "1.75.0"; + }; + profiles.default = { + enableUpdateCheck = false; + enableExtensionUpdateCheck = false; + }; }; nmt.script = ''