ObfuscatedCodeFileUtils.spec.ts 527 B

1234567891011121314151617
  1. import { expect } from 'chai';
  2. import { ObfuscatedCodeFileUtils } from '../../../src/cli/utils/ObfuscatedCodeFileUtils';
  3. describe('ObfuscatedCodeFileUtils', () => {
  4. let util: ObfuscatedCodeFileUtils;
  5. beforeEach(() => {
  6. util = new ObfuscatedCodeFileUtils('src/cli/', {
  7. output: 'src/cli/dist',
  8. });
  9. });
  10. it('should handle input path ending (or not ending) with forward slash', () => {
  11. const result = util.getOutputCodePath('src/cli/app.js');
  12. expect(result).equals('src/cli/dist/app.js');
  13. });
  14. });