chore: remove unused util function
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
import { Position, NodeTypes } from '../src/ast'
|
||||
import {
|
||||
getInnerRange,
|
||||
advancePositionWithClone,
|
||||
isEmptyExpression
|
||||
} from '../src/utils'
|
||||
import { Position } from '../src/ast'
|
||||
import { getInnerRange, advancePositionWithClone } from '../src/utils'
|
||||
|
||||
function p(line: number, column: number, offset: number): Position {
|
||||
return { column, line, offset }
|
||||
@@ -71,41 +67,3 @@ describe('getInnerRange', () => {
|
||||
expect(loc2.end.offset).toBe(7)
|
||||
})
|
||||
})
|
||||
|
||||
describe('isEmptyExpression', () => {
|
||||
test('empty', () => {
|
||||
expect(
|
||||
isEmptyExpression({
|
||||
content: '',
|
||||
type: NodeTypes.SIMPLE_EXPRESSION,
|
||||
isStatic: true,
|
||||
isConstant: true,
|
||||
loc: null as any
|
||||
})
|
||||
).toBe(true)
|
||||
})
|
||||
|
||||
test('spaces', () => {
|
||||
expect(
|
||||
isEmptyExpression({
|
||||
content: ' \t ',
|
||||
type: NodeTypes.SIMPLE_EXPRESSION,
|
||||
isStatic: true,
|
||||
isConstant: true,
|
||||
loc: null as any
|
||||
})
|
||||
).toBe(true)
|
||||
})
|
||||
|
||||
test('identifier', () => {
|
||||
expect(
|
||||
isEmptyExpression({
|
||||
content: 'foo',
|
||||
type: NodeTypes.SIMPLE_EXPRESSION,
|
||||
isStatic: true,
|
||||
isConstant: true,
|
||||
loc: null as any
|
||||
})
|
||||
).toBe(false)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user