How to use unixify - 10 common examples

To help you get started, we’ve selected a few unixify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TypeStrong / fork-ts-checker-webpack-plugin / test / integration / vue.spec.ts View on Github external
it('should create a Vue program config if vue is enabled', async () => {
      const { getKnownFileNames, files } = await createCompiler({
        pluginOptions: { vue: vueEnabledOption }
      });

      const fileNames = await getKnownFileNames();

      let fileFound;
      let fileWeWant = unixify(files['example.vue']);
      fileFound = fileNames.some(filename => unixify(filename) === fileWeWant);
      expect(fileFound).toBe(true);

      fileWeWant = unixify(files['syntacticError.ts']);
      fileFound = fileNames.some(filename => unixify(filename) === fileWeWant);
      expect(fileFound).toBe(true);
    });
github TypeStrong / fork-ts-checker-webpack-plugin / test / integration / general.spec.ts View on Github external
compiler.run((err, stats) => {
        const { warnings, errors } = stats.compilation;
        expect(warnings.length).toBe(2);

        const [warning, warning2] = warnings;
        const actualFile = unixify(warning.file);
        const expectedFile = unixify('src/lib/func.ts');
        expect(actualFile).toContain(expectedFile);
        expect(warning.rawMessage).toContain('WARNING');
        expect(warning.rawMessage).toContain('@typescript-eslint/array-type');
        expect(warning.rawMessage).toContain(
          "Array type using 'Array' is forbidden. Use 'string[]' instead."
        );
        expect(warning.location).toEqual({
          character: 44,
          line: 3
        });

        const actualFile2 = unixify(warning2.file);
        const expectedFile2 = unixify('src/lib/otherFunc.js');
        expect(actualFile2).toContain(expectedFile2);
        expect(warning2.rawMessage).toContain('WARNING');
github TypeStrong / fork-ts-checker-webpack-plugin / test / integration / general.spec.ts View on Github external
expect(warning2.rawMessage).toContain('WARNING');
        expect(warning2.rawMessage).toContain(
          '@typescript-eslint/no-unused-vars'
        );
        expect(warning2.rawMessage).toContain(
          "'i' is assigned a value but never used."
        );
        expect(warning2.location).toEqual({
          character: 5,
          line: 4
        });

        const error = errors.find(err =>
          err.rawMessage.includes('@typescript-eslint/array-type')
        );
        const actualErrorFile = unixify(error.file);
        const expectedErrorFile = unixify('src/index.ts');
        expect(actualErrorFile).toContain(expectedErrorFile);
        expect(error.rawMessage).toContain('ERROR');
        expect(error.rawMessage).toContain('@typescript-eslint/array-type');
        expect(error.rawMessage).toContain(
          "Array type using 'Array' is forbidden. Use 'string[]' instead."
        );
        expect(error.location).toEqual({
          character: 43,
          line: 5
        });

        callback();
      });
    });
github TypeStrong / fork-ts-checker-webpack-plugin / test / integration / general.spec.ts View on Github external
expect(warning2.rawMessage).toContain(
          '@typescript-eslint/no-unused-vars'
        );
        expect(warning2.rawMessage).toContain(
          "'i' is assigned a value but never used."
        );
        expect(warning2.location).toEqual({
          character: 5,
          line: 4
        });

        const error = errors.find(err =>
          err.rawMessage.includes('@typescript-eslint/array-type')
        );
        const actualErrorFile = unixify(error.file);
        const expectedErrorFile = unixify('src/index.ts');
        expect(actualErrorFile).toContain(expectedErrorFile);
        expect(error.rawMessage).toContain('ERROR');
        expect(error.rawMessage).toContain('@typescript-eslint/array-type');
        expect(error.rawMessage).toContain(
          "Array type using 'Array' is forbidden. Use 'string[]' instead."
        );
        expect(error.location).toEqual({
          character: 43,
          line: 5
        });

        callback();
      });
    });
github TypeStrong / fork-ts-checker-webpack-plugin / test / integration / general.spec.ts View on Github external
const [warning, warning2] = warnings;
        const actualFile = unixify(warning.file);
        const expectedFile = unixify('src/lib/func.ts');
        expect(actualFile).toContain(expectedFile);
        expect(warning.rawMessage).toContain('WARNING');
        expect(warning.rawMessage).toContain('@typescript-eslint/array-type');
        expect(warning.rawMessage).toContain(
          "Array type using 'Array' is forbidden. Use 'string[]' instead."
        );
        expect(warning.location).toEqual({
          character: 44,
          line: 3
        });

        const actualFile2 = unixify(warning2.file);
        const expectedFile2 = unixify('src/lib/otherFunc.js');
        expect(actualFile2).toContain(expectedFile2);
        expect(warning2.rawMessage).toContain('WARNING');
        expect(warning2.rawMessage).toContain(
          '@typescript-eslint/no-unused-vars'
        );
        expect(warning2.rawMessage).toContain(
          "'i' is assigned a value but never used."
        );
        expect(warning2.location).toEqual({
          character: 5,
          line: 4
        });

        const error = errors.find(err =>
          err.rawMessage.includes('@typescript-eslint/array-type')
        );
github TypeStrong / fork-ts-checker-webpack-plugin / test / integration / general.spec.ts View on Github external
expect(warning2.rawMessage).toContain('WARNING');
        expect(warning2.rawMessage).toContain(
          '@typescript-eslint/no-unused-vars'
        );
        expect(warning2.rawMessage).toContain(
          "'i' is assigned a value but never used."
        );
        expect(warning2.location).toEqual({
          character: 5,
          line: 4
        });

        const error = errors.find(err =>
          err.rawMessage.includes('@typescript-eslint/array-type')
        );
        const actualErrorFile = unixify(error.file);
        const expectedErrorFile = unixify('src/index.ts');
        expect(actualErrorFile).toContain(expectedErrorFile);
        expect(error.rawMessage).toContain('ERROR');
        expect(error.rawMessage).toContain('@typescript-eslint/array-type');
        expect(error.rawMessage).toContain(
          "Array type using 'Array' is forbidden. Use 'string[]' instead."
        );
        expect(error.location).toEqual({
          character: 43,
          line: 5
        });

        callback();
      });
    });
github TypeStrong / fork-ts-checker-webpack-plugin / test / integration / general.spec.ts View on Github external
const [warning, warning2] = warnings;
        const actualFile = unixify(warning.file);
        const expectedFile = unixify('src/lib/func.ts');
        expect(actualFile).toContain(expectedFile);
        expect(warning.rawMessage).toContain('WARNING');
        expect(warning.rawMessage).toContain('@typescript-eslint/array-type');
        expect(warning.rawMessage).toContain(
          "Array type using 'Array' is forbidden. Use 'string[]' instead."
        );
        expect(warning.location).toEqual({
          character: 44,
          line: 3
        });

        const actualFile2 = unixify(warning2.file);
        const expectedFile2 = unixify('src/lib/otherFunc.js');
        expect(actualFile2).toContain(expectedFile2);
        expect(warning2.rawMessage).toContain('WARNING');
        expect(warning2.rawMessage).toContain(
          '@typescript-eslint/no-unused-vars'
        );
        expect(warning2.rawMessage).toContain(
          "'i' is assigned a value but never used."
        );
        expect(warning2.location).toEqual({
          character: 5,
          line: 4
        });

        const error = errors.find(err =>
          err.rawMessage.includes('@typescript-eslint/array-type')
github TypeStrong / fork-ts-checker-webpack-plugin / test / integration / general.spec.ts View on Github external
compiler.run((err, stats) => {
        const { warnings, errors } = stats.compilation;
        expect(warnings.length).toBe(2);

        const [warning, warning2] = warnings;
        const actualFile = unixify(warning.file);
        const expectedFile = unixify('src/lib/func.ts');
        expect(actualFile).toContain(expectedFile);
        expect(warning.rawMessage).toContain('WARNING');
        expect(warning.rawMessage).toContain('@typescript-eslint/array-type');
        expect(warning.rawMessage).toContain(
          "Array type using 'Array' is forbidden. Use 'string[]' instead."
        );
        expect(warning.location).toEqual({
          character: 44,
          line: 3
        });

        const actualFile2 = unixify(warning2.file);
        const expectedFile2 = unixify('src/lib/otherFunc.js');
        expect(actualFile2).toContain(expectedFile2);
        expect(warning2.rawMessage).toContain('WARNING');
        expect(warning2.rawMessage).toContain(
github TypeStrong / fork-ts-checker-webpack-plugin / test / integration / general.spec.ts View on Github external
compiler.run((err, stats) => {
        const { warnings, errors } = stats.compilation;
        expect(warnings.length).toBe(2);

        const [warning, warning2] = warnings;
        const actualFile = unixify(warning.file);
        const expectedFile = unixify('src/lib/func.ts');
        expect(actualFile).toContain(expectedFile);
        expect(warning.rawMessage).toContain('WARNING');
        expect(warning.rawMessage).toContain('@typescript-eslint/array-type');
        expect(warning.rawMessage).toContain(
          "Array type using 'Array' is forbidden. Use 'string[]' instead."
        );
        expect(warning.location).toEqual({
          character: 44,
          line: 3
        });

        const actualFile2 = unixify(warning2.file);
        const expectedFile2 = unixify('src/lib/otherFunc.js');
        expect(actualFile2).toContain(expectedFile2);
        expect(warning2.rawMessage).toContain('WARNING');
github TypeStrong / fork-ts-checker-webpack-plugin / test / integration / vue.spec.ts View on Github external
      fileFound = fileNames.some(filename => unixify(filename) === fileWeWant);
      expect(fileFound).toBe(true);

unixify

Convert Windows file paths to unix paths.

MIT
Latest version published 7 years ago

Package Health Score

68 / 100
Full package analysis

Popular unixify functions