[env] INPUT = ''' { "name": "partiql-pokemon", "version": "0.202105.0", "private": true, "scripts": { "dev": "next", "build": "next build", "start": "next start", "prod": "next build && next start", "lint": "eslint . --fix -c .eslintrc.js --ext js,jsx,ts,tsx --ignore-pattern='!.*'", "type-check": "tsc" }, "dependencies": { "@material-ui/core": "^4.11.3", "@material-ui/icons": "^4.11.2", "next": "^9.4.4", "react": "^16.13.1", "react-dom": "^16.13.1" }, "devDependencies": { "@types/node": "^14.0.13", "@types/react": "^17.0.3", "@types/react-dom": "^17.0.3", "@typescript-eslint/eslint-plugin": "^4.22.0", "@typescript-eslint/parser": "^4.22.0", "eslint-plugin-import": "^2.22.1", "eslint-plugin-react-hooks": "^4.2.0", "typescript": "^4.2.4" }, "license": "MIT" } ''' [tests.to-json] script = ''' echo $INPUT | ./target/debug/pq -t json ''' tobe = ''' { "name": "partiql-pokemon", "version": "0.202105.0", "private": true, "scripts": { "dev": "next", "build": "next build", "start": "next start", "prod": "next build && next start", "lint": "eslint . --fix -c .eslintrc.js --ext js,jsx,ts,tsx --ignore-pattern='!.*'", "type-check": "tsc" }, "dependencies": { "@material-ui/core": "^4.11.3", "@material-ui/icons": "^4.11.2", "next": "^9.4.4", "react": "^16.13.1", "react-dom": "^16.13.1" }, "devDependencies": { "@types/node": "^14.0.13", "@types/react": "^17.0.3", "@types/react-dom": "^17.0.3", "@typescript-eslint/eslint-plugin": "^4.22.0", "@typescript-eslint/parser": "^4.22.0", "eslint-plugin-import": "^2.22.1", "eslint-plugin-react-hooks": "^4.2.0", "typescript": "^4.2.4" }, "license": "MIT" } ''' [tests.to-toml] script = ''' echo $INPUT | ./target/debug/pq -t toml ''' tobe = ''' name = 'partiql-pokemon' version = '0.202105.0' private = true license = 'MIT' [scripts] dev = 'next' build = 'next build' start = 'next start' prod = 'next build && next start' lint = "eslint . --fix -c .eslintrc.js --ext js,jsx,ts,tsx --ignore-pattern='!.*'" type-check = 'tsc' [dependencies] "@material-ui/core" = '^4.11.3' "@material-ui/icons" = '^4.11.2' next = '^9.4.4' react = '^16.13.1' react-dom = '^16.13.1' [devDependencies] "@types/node" = '^14.0.13' "@types/react" = '^17.0.3' "@types/react-dom" = '^17.0.3' "@typescript-eslint/eslint-plugin" = '^4.22.0' "@typescript-eslint/parser" = '^4.22.0' eslint-plugin-import = '^2.22.1' eslint-plugin-react-hooks = '^4.2.0' typescript = '^4.2.4' ''' [tests.to-yaml] script = ''' echo $INPUT | ./target/debug/pq -t yaml ''' tobe = ''' name: partiql-pokemon version: 0.202105.0 private: true scripts: dev: next build: next build start: next start prod: next build && next start lint: "eslint . --fix -c .eslintrc.js --ext js,jsx,ts,tsx --ignore-pattern='!.*'" type-check: tsc dependencies: "@material-ui/core": ^4.11.3 "@material-ui/icons": ^4.11.2 next: ^9.4.4 react: ^16.13.1 react-dom: ^16.13.1 devDependencies: "@types/node": ^14.0.13 "@types/react": ^17.0.3 "@types/react-dom": ^17.0.3 "@typescript-eslint/eslint-plugin": ^4.22.0 "@typescript-eslint/parser": ^4.22.0 eslint-plugin-import: ^2.22.1 eslint-plugin-react-hooks: ^4.2.0 typescript: ^4.2.4 license: MIT ''' [tests.to-xml] script = ''' echo $INPUT | ./target/debug/pq -t xml ''' tobe = ''' partiql-pokemon0.202105.0truenextnext buildnext startnext build && next starteslint . --fix -c .eslintrc.js --ext js,jsx,ts,tsx --ignore-pattern='!.*'tsc<@material-ui/core>^4.11.3<@material-ui/icons>^4.11.2^9.4.4^16.13.1^16.13.1<@types/node>^14.0.13<@types/react>^17.0.3<@types/react-dom>^17.0.3<@typescript-eslint/eslint-plugin>^4.22.0<@typescript-eslint/parser>^4.22.0^2.22.1^4.2.0^4.2.4MIT '''