1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-04-21 05:01:31 +00:00

feat: h54s Tables() compatibility

This commit is contained in:
Trevor Moody
2025-08-22 10:24:02 +01:00
parent 8a10c229d6
commit fd6fad9b07
6 changed files with 79 additions and 1 deletions
+28
View File
@@ -0,0 +1,28 @@
import SASjs from '../SASjs'
describe('Tables - basic coverage', () => {
const adapter = new SASjs()
it('should throw an error if first argument is not an array', () => {
expect(() => adapter.Tables({}, 'test')).toThrow('First argument')
})
it('should throw an error if second argument is not a string', () => {
// @ts-expect-error
expect(() => adapter.Tables([], 1234)).toThrow('Second argument')
})
it('should throw an error if macro name ends with a number', () => {
expect(() => adapter.Tables([], 'test1')).toThrow('number at the end')
})
it('should throw an error if no arguments are passed', () => {
// @ts-expect-error
expect(() => adapter.Tables()).toThrow('Missing arguments')
})
it('should create Tables class successfully with _tables property', () => {
const tables = adapter.Tables([], 'test')
expect(tables).toHaveProperty('_tables')
})
})