Skip to content

Commit

Permalink
feat: remove globals
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianrothe committed Jul 23, 2023
1 parent ea8b0c3 commit 15c5f5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/__tests__/transformer.test.cjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { jest, expect, describe, it } from '@jest/globals'

const { readFileSync } = require('fs')
const { resolve } = require('path')

const transformer = require('../../dist/transformer.cjs')

const runTransformer = (filename, options) => {
const path = require.resolve(`./fixtures/${filename}.svelte`)
const source = readFileSync(path).toString()
const result = transformer.process(source, path, { transformerConfig: options })
const result = transformer.process(source, path, {
transformerConfig: { svelteVersion: '3', ...options }
})
expect(result.code).toBeDefined()
expect(result.code).toContain('SvelteComponent')
expect(result.map).toBeDefined()
Expand Down
1 change: 0 additions & 1 deletion src/__tests__/transformer.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { readFileSync } from 'fs'
import { dirname } from 'path'
import { fileURLToPath } from 'url'
import { jest, expect, describe, it } from '@jest/globals'

import transformer from '../../dist/transformer.mjs'

Expand Down

0 comments on commit 15c5f5c

Please sign in to comment.