diff --git a/test/prettier/test.sh b/test/prettier/latest.sh similarity index 100% rename from test/prettier/test.sh rename to test/prettier/latest.sh diff --git a/test/prettier/scenarios.json b/test/prettier/scenarios.json index 29fec4cc6..b8cab6a32 100644 --- a/test/prettier/scenarios.json +++ b/test/prettier/scenarios.json @@ -1,17 +1,26 @@ { - "test": { + "latest": { "image": "mcr.microsoft.com/devcontainers/base:debian", "features": { "prettier": {} } }, - "plugin": { + "v3-plugin": { "image": "mcr.microsoft.com/devcontainers/base:debian", "features": { "prettier": { - "version": "latest", + "version": "3.0.0", "plugins": "prettier-plugin-ini" } } + }, + "v2-plugins": { + "image": "mcr.microsoft.com/devcontainers/base:debian", + "features": { + "prettier": { + "version": "2.8.8", + "plugins": "@prettier/plugin-php@0.19.6,@prettier/plugin-ruby@4.0.2,@prettier/plugin-xml@3.1.0" + } + } } } \ No newline at end of file diff --git a/test/prettier/v2-plugins.sh b/test/prettier/v2-plugins.sh new file mode 100755 index 000000000..fec37633c --- /dev/null +++ b/test/prettier/v2-plugins.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +set -e + +source dev-container-features-test-lib + +check "prettier --version = 2.8.8" [ "$(prettier --version)" = "2.8.8" ] + +for p in php ruby xml; do + plugin="@prettier/plugin-${p}" + check "npm list --parseable --depth 0 | grep ${plugin}" npm list --parseable --depth 0 | grep "${plugin}" +done + +reportResults diff --git a/test/prettier/plugin.sh b/test/prettier/v3-plugin.sh similarity index 73% rename from test/prettier/plugin.sh rename to test/prettier/v3-plugin.sh index c274d91d4..c47fa936e 100755 --- a/test/prettier/plugin.sh +++ b/test/prettier/v3-plugin.sh @@ -4,6 +4,8 @@ set -e source dev-container-features-test-lib +check "prettier --version = 3.0.0" [ "$(prettier --version)" = "3.0.0" ] + check "npm list --parseable --depth 0 | grep prettier-plugin-ini" npm list --parseable --depth 0 | grep "prettier-plugin-ini" reportResults