Currently in the process of writing unit tests for computed properties.
I have a file called fileOne.ts :
export const fileOne = () => {
const fx1 = computed ( () => { ... } );
const fx2 = computed ( () => { ... } );
const fx3 = computed ( () => { ... } );
}
This 'fileOne' is also used in a Vue.vue file :
<template>
...
</template>
<script lang="ts">
import { fileOne } from './fileOne';
const fileOneState = fileOne( ... );
...
</script>
The goal is to test the computed properties of fileOne. I have a file called 'fileOne.spec.ts' with:
describe('testing computed properties', () => {
it('should return the correct value', () => {
expect().toBe();
})
});
The challenge is: I am unsure of what to import or how to access an instance with the computed properties for testing.
I know this may be a bit unclear, but any assistance would be greatly appreciated.
Thank you