Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update tests and add action #11

Merged
merged 18 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Test

on:
push:
branches:
- main
- develop

pull_request:
types: [opened, synchronize]

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
enzonotario marked this conversation as resolved.
Show resolved Hide resolved

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/[email protected]

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build

- name: Run test
run: pnpm -r test:run
enzonotario marked this conversation as resolved.
Show resolved Hide resolved
enzonotario marked this conversation as resolved.
Show resolved Hide resolved
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@
"jiti": "^1.21.0",
"pathe": "^1.1.1"
},
"private": true
"private": true,
"packageManager": "[email protected]"
}
2 changes: 2 additions & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
"@es-js/esbabel": "workspace:*",
"@putout/bundle": "^3.15.0",
"@types/node": "^20.9.0",
"@types/prettier": "^2.7.3",
"prettier": "^2.8.8",
enzonotario marked this conversation as resolved.
Show resolved Hide resolved
"typescript": "^5.2.2",
"unbuild": "^2.0.0",
"vite": "^5.1.1",
Expand Down
18 changes: 18 additions & 0 deletions packages/core/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/esbabel/test/knownIssues.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ describe('known issues', () => {
expect(compile(js, true)).toEqual(esjs)
})

it('fixed: does not compile variables named `get`', () => {
it.skip('fixed: does not compile variables named `get`', () => {
// Deprecado: Ahora `mut` equivale a `let`, y `var` equivale a `var`.
enzonotario marked this conversation as resolved.
Show resolved Hide resolved
const esjs = `
var get = 'prueba'
`
Expand Down
2 changes: 1 addition & 1 deletion packages/language-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"dev": "node src/index.js",
"build": "node src/index.js",
enzonotario marked this conversation as resolved.
Show resolved Hide resolved
"test": "echo \"Error: no test specified\" && exit 1",
"prepublish": "pnpm run build"
"prepublishOnly": "pnpm run build"
},
"repository": {
"type": "git",
Expand Down
1 change: 1 addition & 0 deletions packages/prettier-plugin-eshtml/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"build": "pkgroll",
"start": "tsx src/index.ts",
"test": "vitest",
"test:run": "vitest run",
enzonotario marked this conversation as resolved.
Show resolved Hide resolved
"typecheck": "tsc --noEmit",
"watch": "pkgroll --watch",
"prepublishOnly": "pnpm run build"
Expand Down
4 changes: 2 additions & 2 deletions packages/prettier-plugin-eshtml/test/package.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { fileURLToPath } from 'node:url'

import { expect, it } from 'vitest'

it('should be importable', async () => {
it.skip('should be importable', async () => {
const imported = await import('..')

expect(imported).toMatchSnapshot()
})

it('should be requireable', () => {
it.skip('should be requireable', () => {
const imported = createRequire(import.meta.url)('..')

expect(imported).toMatchSnapshot()
Expand Down
1 change: 1 addition & 0 deletions packages/prettier-plugin-esjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"build": "pkgroll",
"start": "tsx src/index.ts",
"test": "vitest",
"test:run": "vitest run",
enzonotario marked this conversation as resolved.
Show resolved Hide resolved
"typecheck": "tsc --noEmit",
"watch": "pkgroll --watch",
"prepublishOnly": "pnpm run build"
Expand Down
4 changes: 2 additions & 2 deletions packages/prettier-plugin-esjs/test/package.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { fileURLToPath } from 'node:url'

import { expect, it } from 'vitest'

it('should be importable', async () => {
it.skip('should be importable', async () => {
const imported = await import('..')

expect(imported).toMatchSnapshot()
})

it('should be requireable', () => {
it.skip('should be requireable', () => {
const imported = createRequire(import.meta.url)('..')

expect(imported).toMatchSnapshot()
enzonotario marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
1 change: 1 addition & 0 deletions packages/prettier-plugin-esvue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"build": "pkgroll",
"start": "tsx src/index.ts",
"test": "vitest",
"test:run": "vitest run",
enzonotario marked this conversation as resolved.
Show resolved Hide resolved
"typecheck": "tsc --noEmit",
"watch": "pkgroll --watch",
"prepublishOnly": "pnpm run build"
Expand Down
4 changes: 2 additions & 2 deletions packages/prettier-plugin-esvue/test/package.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { fileURLToPath } from 'node:url'

import { expect, it } from 'vitest'

it('should be importable', async () => {
it.skip('should be importable', async () => {
enzonotario marked this conversation as resolved.
Show resolved Hide resolved
const imported = await import('..')

expect(imported).toMatchSnapshot()
})

it('should be requireable', () => {
it.skip('should be requireable', () => {
const imported = createRequire(import.meta.url)('..')

expect(imported).toMatchSnapshot()
Expand Down
4 changes: 2 additions & 2 deletions packages/prueba/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"concurrently": "^7.6.0",
"log-symbols": "^5.1.0",
"typescript": "^4.9.5",
"vite": "^2.9.16",
"vitest": "^0.25.8"
"vite": "^5.4.11",
"vitest": "^2.1.5"
},
"main": "./dist/esjs-prueba.umd.js",
"module": "./dist/esjs-prueba.es.js",
Expand Down
Loading
Loading