Skip to content

Commit

Permalink
Fix file encoding issue in test files
Browse files Browse the repository at this point in the history
  • Loading branch information
1aron committed Jan 22, 2024
1 parent 43c699d commit 84529f5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/css/tests/cjs/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ it('init cjs', () => {
const configFilepath = resolve(__dirname, 'master.css.js')
rm(configFilepath)
execSync('tsx ../../dist/bin/index.bundle.js init', { cwd: __dirname, stdio: 'inherit' })
expect(readFileSync(configFilepath, 'utf-8')).toBe(require('../../src/master.css.js.txt'))
expect(readFileSync(configFilepath, 'utf-8').normalize()).toEqual(require('../../src/master.css.js.txt').normalize())
rm(configFilepath)
})
2 changes: 1 addition & 1 deletion packages/css/tests/esm/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ it('init (type="module")', () => {
const configFilepath = resolve(__dirname, 'master.css.mjs')
rm(configFilepath)
execSync('tsx ../../dist/bin/index.bundle.js init', { cwd: __dirname, stdio: 'inherit' })
expect(readFileSync(configFilepath, 'utf-8').toString()).toBe(require('../../src/master.css.mjs.txt'))
expect(readFileSync(configFilepath, 'utf-8').normalize()).toEqual(require('../../src/master.css.mjs.txt').normalize())
rm(configFilepath)
})
2 changes: 1 addition & 1 deletion packages/css/tests/ts/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ it('init by tsconfig.json', () => {
const configFilepath = resolve(__dirname, 'master.css.ts')
rm(configFilepath)
execSync('tsx ../../dist/bin/index.bundle.js init', { cwd: __dirname, stdio: 'inherit' })
expect(readFileSync(configFilepath, 'utf-8').toString()).toBe(require('../../src/master.css.ts.txt'))
expect(readFileSync(configFilepath, 'utf-8').normalize()).toEqual(require('../../src/master.css.ts.txt').normalize())
rm(configFilepath)
})

0 comments on commit 84529f5

Please sign in to comment.