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 11 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
8 changes: 5 additions & 3 deletions packages/language-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
"scripts": {
"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"
"test": "vitest",
"test:run": "vitest run",
"prepublishOnly": "pnpm run build"
},
"repository": {
"type": "git",
Expand All @@ -23,7 +24,8 @@
],
"devDependencies": {
"@es-js/core": "workspace:*",
"markdown-table": "^3.0.3"
"markdown-table": "^3.0.3",
"vitest": "^2.1.5"
enzonotario marked this conversation as resolved.
Show resolved Hide resolved
},
"exports": {
"./esjs.tmLanguage.json": {
Expand Down
Loading
Loading