mirror of
https://github.com/cachix/install-nix-action.git
synced 2024-11-29 03:43:56 +00:00
1 line
No EOL
23 KiB
Text
1 line
No EOL
23 KiB
Text
{"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../src/index.spec.ts"],"names":[],"mappings":";;AAAA,+BAA6B;AAC7B,iDAAoC;AACpC,+BAA2B;AAC3B,iCAAiC;AACjC,iCAAiC;AACjC,yCAAyC;AACzC,mCAA2C;AAE3C,MAAM,QAAQ,GAAG,WAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAA;AAC5C,MAAM,SAAS,GAAG,WAAI,CAAC,SAAS,EAAE,aAAa,CAAC,CAAA;AAChD,MAAM,OAAO,GAAG,WAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,eAAe,CAAC,CAAA;AACpG,MAAM,QAAQ,GAAG,SAAS,SAAS,gBAAgB,OAAO,GAAG,CAAA;AAE7D,MAAM,iBAAiB,GAAG,gFAAgF,CAAA;AAE1G,QAAQ,CAAC,SAAS,EAAE;IAClB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAEnB,EAAE,CAAC,mCAAmC,EAAE;QACtC,aAAM,CAAC,eAAO,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,CAAA;IAC9D,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,KAAK,EAAE;QACd,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAEf,EAAE,CAAC,oBAAoB,EAAE,UAAU,IAAI;YACrC,oBAAI,CAAC,GAAG,QAAQ,oBAAoB,EAAE,UAAU,GAAG,EAAE,MAAM;gBACzD,aAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;gBAC1B,aAAM,CAAC,MAAM,CA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AAC,MAAM,CAAC,CAAA,CAAC,sBAAsB;YAC3D,IAAI,QAAgB,CAAA;YAEpB,MAAM,CAAC;gBACL,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAM,EAAE,QAAQ,EAAE,EAAE;oBAChD,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAA;oBAE3B,CAAC,CAAC,QAAQ,GAAG,CAAC,IAAY,EAAE,QAAgB,EAAE,EAAE;wBAC9C,QAAQ,GAAG,IAAI,CAAA;wBACf,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;oBAC5C,CAAC,CAAA;oBAED,OAAO,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAA;gBACzB,CAAC,CAAA;YACH,CAAC,CAAC,CAAA;YAEF,KAAK,CAAC;gBACJ,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,GAAG,CAAA,CAAC,sBAAsB;YACzD,CAAC,CAAC,CAAA;YAEF,EAAE,CAAC,wBAAwB,EAAE,UAAU,IAAI;gBACzC,IAAI;oBACF,OAAO,CAAC,uBAAuB,CAAC,CAAA;iBACjC;gBAAC,OAAO,KAAK,EAAE;oBACd,aAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,mCAAmC,CAAC,CAAA;iBACpE;gBAED,aAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAA;gBAE5C,IAAI,EAAE,CAAA;YACR,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA","sourcesContent":["import { expect } from 'chai'\nimport { exec } from 'child_process'\nimport { join } from 'path'\nimport semver = require('semver')\nimport ts = require('typescript')\nimport proxyquire = require('proxyquire')\nimport { register, VERSION } from './index'\n\nconst TEST_DIR = join(__dirname, '../tests')\nconst EXEC_PATH = join(__dirname, '../dist/bin')\nconst PROJECT = join(TEST_DIR, semver.gte(ts.version, '2.5.0') ? 'tsconfig.json5' : 'tsconfig.json')\nconst BIN_EXEC = `node \"${EXEC_PATH}\" --project \"${PROJECT}\"`\n\nconst SOURCE_MAP_REGEXP = /\\/\\/# sourceMappingURL=data:application\\/json;charset=utf\\-8;base64,[\\w\\+]+=*$/\n\ndescribe('ts-node', function () {\n this.timeout(10000)\n\n it('should export the correct version', function () {\n expect(VERSION).to.equal(require('../package.json').version)\n })\n\n describe('cli', function () {\n this.slow(1000)\n\n it('should execute cli', function (done) {\n exec(`${BIN_EXEC} tests/hello-world`, function (err, stdout) {\n expect(err).to.equal(null)\n expect(stdout).to.equal('Hello, world!\\n')\n\n return done()\n })\n })\n\n it('should register via cli', function (done) {\n exec(`node -r ../register hello-world.ts`, {\n cwd: TEST_DIR\n }, function (err, stdout) {\n expect(err).to.equal(null)\n expect(stdout).to.equal('Hello, world!\\n')\n\n return done()\n })\n })\n\n it('should execute cli with absolute path', function (done) {\n exec(`${BIN_EXEC} \"${join(TEST_DIR, 'hello-world')}\"`, function (err, stdout) {\n expect(err).to.equal(null)\n expect(stdout).to.equal('Hello, world!\\n')\n\n return done()\n })\n })\n\n it('should print scripts', function (done) {\n exec(`${BIN_EXEC} -pe \"import { example } from './tests/complex/index';example()\"`, function (err, stdout) {\n expect(err).to.equal(null)\n expect(stdout).to.equal('example\\n')\n\n return done()\n })\n })\n\n if (semver.gte(ts.version, '1.8.0')) {\n it('should allow js', function (done) {\n exec(\n [\n BIN_EXEC,\n '-O \"{\\\\\\\"allowJs\\\\\\\":true}\"',\n '-pe \"import { main } from \\'./tests/allow-js/run\\';main()\"'\n ].join(' '),\n function (err, stdout) {\n expect(err).to.equal(null)\n expect(stdout).to.equal('hello world\\n')\n\n return done()\n }\n )\n })\n\n it('should include jsx when `allow-js` true', function (done) {\n exec(\n [\n BIN_EXEC,\n '-O \"{\\\\\\\"allowJs\\\\\\\":true}\"',\n '-pe \"import { Foo2 } from \\'./tests/allow-js/with-jsx\\'; Foo2.sayHi()\"'\n ].join(' '),\n function (err, stdout) {\n expect(err).to.equal(null)\n expect(stdout).to.equal('hello world\\n')\n\n return done()\n }\n )\n })\n }\n\n it('should eval code', function (done) {\n exec(\n `${BIN_EXEC} -e \"import * as m from './tests/module';console.log(m.example('test'))\"`,\n function (err, stdout) {\n expect(err).to.equal(null)\n expect(stdout).to.equal('TEST\\n')\n\n return done()\n }\n )\n })\n\n it('should import empty files', function (done) {\n exec(`${BIN_EXEC} -e \"import './tests/empty'\"`, function (err, stdout) {\n expect(err).to.equal(null)\n expect(stdout).to.equal('')\n\n return done()\n })\n })\n\n it('should throw errors', function (done) {\n exec(`${BIN_EXEC} -e \"import * as m from './tests/module';console.log(m.example(123))\"`, function (err) {\n if (err === null) {\n return done('Command was expected to fail, but it succeeded.')\n }\n\n expect(err.message).to.match(new RegExp(\n 'TS2345: Argument of type \\'(?:number|123)\\' ' +\n 'is not assignable to parameter of type \\'string\\'\\\\.'\n ))\n\n return done()\n })\n })\n\n it('should be able to ignore diagnostic', function (done) {\n exec(\n `${BIN_EXEC} --ignore-diagnostics 2345 -e \"import * as m from './tests/module';console.log(m.example(123))\"`,\n function (err) {\n if (err === null) {\n return done('Command was expected to fail, but it succeeded.')\n }\n\n expect(err.message).to.match(\n /TypeError: (?:(?:undefined|foo\\.toUpperCase) is not a function|.*has no method \\'toUpperCase\\')/\n )\n\n return done()\n }\n )\n })\n\n it('should work with source maps', function (done) {\n exec(`${BIN_EXEC} tests/throw`, function (err) {\n if (err === null) {\n return done('Command was expected to fail, but it succeeded.')\n }\n\n expect(err.message).to.contain([\n `${join(__dirname, '../tests/throw.ts')}:3`,\n ' bar () { throw new Error(\\'this is a demo\\') }',\n ' ^',\n 'Error: this is a demo'\n ].join('\\n'))\n\n return done()\n })\n })\n\n it.skip('eval should work with source maps', function (done) {\n exec(`${BIN_EXEC} -pe \"import './tests/throw'\"`, function (err) {\n if (err === null) {\n return done('Command was expected to fail, but it succeeded.')\n }\n\n expect(err.message).to.contain([\n `${join(__dirname, '../tests/throw.ts')}:3`,\n ' bar () { throw new Error(\\'this is a demo\\') }',\n ' ^'\n ].join('\\n'))\n\n return done()\n })\n })\n\n it('should support transpile only mode', function (done) {\n exec(`${BIN_EXEC} --transpile-only -pe \"x\"`, function (err) {\n if (err === null) {\n return done('Command was expected to fail, but it succeeded.')\n }\n\n expect(err.message).to.contain('ReferenceError: x is not defined')\n\n return done()\n })\n })\n\n it('should pipe into `ts-node` and evaluate', function (done) {\n const cp = exec(BIN_EXEC, function (err, stdout) {\n expect(err).to.equal(null)\n expect(stdout).to.equal('hello\\n')\n\n return done()\n })\n\n cp.stdin!.end(\"console.log('hello')\")\n })\n\n it('should pipe into `ts-node`', function (done) {\n const cp = exec(`${BIN_EXEC} -p`, function (err, stdout) {\n expect(err).to.equal(null)\n expect(stdout).to.equal('true\\n')\n\n return done()\n })\n\n cp.stdin!.end('true')\n })\n\n it('should pipe into an eval script', function (done) {\n const cp = exec(`${BIN_EXEC} --transpile-only -pe 'process.stdin.isTTY'`, function (err, stdout) {\n expect(err).to.equal(null)\n expect(stdout).to.equal('undefined\\n')\n\n return done()\n })\n\n cp.stdin!.end('true')\n })\n\n it('should support require flags', function (done) {\n exec(`${BIN_EXEC} -r ./tests/hello-world -pe \"console.log('success')\"`, function (err, stdout) {\n expect(err).to.equal(null)\n expect(stdout).to.equal('Hello, world!\\nsuccess\\nundefined\\n')\n\n return done()\n })\n })\n\n it('should support require from node modules', function (done) {\n exec(`${BIN_EXEC} -r typescript -e \"console.log('success')\"`, function (err, stdout) {\n expect(err).to.equal(null)\n expect(stdout).to.equal('success\\n')\n\n return done()\n })\n })\n\n it.skip('should use source maps with react tsx', function (done) {\n exec(`${BIN_EXEC} -r ./tests/emit-compiled.ts tests/jsx-react.tsx`, function (err, stdout) {\n expect(err).to.equal(null)\n expect(stdout).to.equal('todo')\n\n return done()\n })\n })\n\n it('should allow custom typings', function (done) {\n exec(`${BIN_EXEC} tests/custom-types`, function (err, stdout) {\n expect(err).to.match(/Error: Cannot find module 'does-not-exist'/)\n\n return done()\n })\n })\n\n it('should preserve `ts-node` context with child process', function (done) {\n exec(`${BIN_EXEC} tests/child-process`, function (err, stdout) {\n expect(err).to.equal(null)\n expect(stdout).to.equal('Hello, world!\\n')\n\n return done()\n })\n })\n\n it('should import js before ts by default', function (done) {\n exec(`${BIN_EXEC} tests/import-order/compiled`, function (err, stdout) {\n expect(err).to.equal(null)\n expect(stdout).to.equal('Hello, JavaScript!\\n')\n\n return done()\n })\n })\n\n it('should import ts before js when --prefer-ts-exts flag is present', function (done) {\n exec(`${BIN_EXEC} --prefer-ts-exts tests/import-order/compiled`, function (err, stdout) {\n expect(err).to.equal(null)\n expect(stdout).to.equal('Hello, TypeScript!\\n')\n\n return done()\n })\n })\n\n it('should import ts before js when TS_NODE_PREFER_TS_EXTS env is present', function (done) {\n exec(`${BIN_EXEC} tests/import-order/compiled`, { env: { ...process.env, TS_NODE_PREFER_TS_EXTS: 'true' } }, function (err, stdout) {\n expect(err).to.equal(null)\n expect(stdout).to.equal('Hello, TypeScript!\\n')\n\n return done()\n })\n })\n\n it('should ignore .d.ts files', function (done) {\n exec(`${BIN_EXEC} tests/import-order/importer`, function (err, stdout) {\n expect(err).to.equal(null)\n expect(stdout).to.equal('Hello, World!\\n')\n\n return done()\n })\n })\n })\n\n describe('register', function () {\n register({\n project: PROJECT,\n compilerOptions: {\n jsx: 'preserve'\n }\n })\n\n it('should be able to require typescript', function () {\n const m = require('../tests/module')\n\n expect(m.example('foo')).to.equal('FOO')\n })\n\n it('should compile through js and ts', function () {\n const m = require('../tests/complex')\n\n expect(m.example()).to.equal('example')\n })\n\n it('should work with proxyquire', function () {\n const m = proxyquire('../tests/complex', {\n './example': 'hello'\n })\n\n expect(m.example()).to.equal('hello')\n })\n\n it('should work with `require.cache`', function () {\n const { example1, example2 } = require('../tests/require-cache')\n\n expect(example1).to.not.equal(example2)\n })\n\n it('should use source maps', function (done) {\n try {\n require('../tests/throw')\n } catch (error) {\n expect(error.stack).to.contain([\n 'Error: this is a demo',\n ` at Foo.bar (${join(__dirname, '../tests/throw.ts')}:3:18)`\n ].join('\\n'))\n\n done()\n }\n })\n\n describe('JSX preserve', () => {\n let old = require.extensions['.tsx'] // tslint:disable-line\n let compiled: string\n\n before(function () {\n require.extensions['.tsx'] = (m: any, fileName) => { // tslint:disable-line\n const _compile = m._compile\n\n m._compile = (code: string, fileName: string) => {\n compiled = code\n return _compile.call(this, code, fileName)\n }\n\n return old(m, fileName)\n }\n })\n\n after(function () {\n require.extensions['.tsx'] = old // tslint:disable-line\n })\n\n it('should use source maps', function (done) {\n try {\n require('../tests/with-jsx.tsx')\n } catch (error) {\n expect(error.stack).to.contain('SyntaxError: Unexpected token <\\n')\n }\n\n expect(compiled).to.match(SOURCE_MAP_REGEXP)\n\n done()\n })\n })\n })\n})\n"]} |