-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using ApprovalTests in a typescript test file ! #78
Comments
Happy to help maintain a |
Hi,
I'm pretty new in Javascript/typescript.
I don't know how to write this file but whenI have some times, I will try
to investigate it.
Some infos when I try to use it :
I will receive this message from WebStorm
The code looks like this :
import {mocha} from 'approvals';
mocha();
describe('When running some tests', function () {
it('should be able to use Approvals', function () {
let value = 'HELLO WORLD';
this.verify(value);
});
});
Thanks,
2018-04-29 21:53 GMT+02:00 Jason Jarrett <[email protected]>:
… Happy to help maintain a .d.ts - mind sending a PR with how this is
configured within a typical repo?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#78 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AWLkMVj_vwn34yDbtAufwSrS5w8Fw2tuks5tthpLgaJpZM4TjmDM>
.
|
Hi, You will find attached an example project that works under typescript. Best regards |
@staxmanade wouldn't mind contributing to the repository with typings and their documentation. 😄 |
@labsvisual Please do - would love some pull requests and help... |
@staxmanade on it! |
Would it be an option to change the project to a typescript project? I'd be interested in submitting a PR for that. It would still work for JS users. |
@DanKaplanSES I would be open to this. @isidore and I have had a few weekend pairing sessions over the summer - perhaps something we could all jump into in the coming months and work on together. |
I'm down. Let me know. |
Hi Jason! I'm helping someone in the Obsidian plugin community to start writing approval tests for some typescript-based code... I've pointed them at this issue, to see if the attachments help... Will report here how we get on... |
Thanks Clare :) It feels like there should be a way around this. Surely I should be able to import functions into the test file. EDIT: I can import local functions from other files. |
I wonder whether it's worth starting from the other end, from the starter project - which does already import a source file from another location... And seeing if you can add to that the use of a 3rd-party lib. https://github.com/approvals/ApprovalTests.js.StarterProject |
Is it possible to publish also the declaration file for module 'approvals' (.d.ts)
=> npm install @types/approvals`
=> yarn add @types/approvals
The text was updated successfully, but these errors were encountered: