Skip to content

Test errors out at first use of typescript syntax  #205

Open
@BoilerTom90

Description

@BoilerTom90

I'm trying to use jest-dynamodb, and my jest scripts are written in typescript.
Prior to trying this package, I was testing against a real dynamodb table on AWS and the scripts worked.
I've switched to this package and the instructions say to change the preset from ts-jest to @shelf/jest-dynamodb. I've done that:

import type { Config } from '@jest/types';
import { baseJestConfig } from '../../jest.config.base';
const config: Config.InitialOptions = {
   ...baseJestConfig,
   preset: '@shelf/jest-dynamodb',  // 'ts-jest',
   projects: ['./'],
   moduleNameMapper: {
      '^uuid$': require.resolve('uuid')
   },
   setupFilesAfterEnv: ['./tests/common-mocks.js']
};
export default config;

But, when I try to run the test, at the first encounter of typescript syntax, the test errors out.

const x: number = 1;

describe('Env Test', () => {
   test('Environment works', () => {
      expect(true).toBe(true);
   })
});

image

Does this package support tests written in typescript?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions