Skip to content

Commit

Permalink
Extend prettier tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andres-rojas committed Jul 18, 2023
1 parent 488d84f commit 8e6952a
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
File renamed without changes.
15 changes: 12 additions & 3 deletions test/prettier/scenarios.json
Original file line number Diff line number Diff line change
@@ -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/[email protected],@prettier/[email protected],@prettier/[email protected]"
}
}
}
}
14 changes: 14 additions & 0 deletions test/prettier/v2-plugins.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions test/prettier/plugin.sh → test/prettier/v3-plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8e6952a

Please sign in to comment.