Closed bigbigDreamer closed 2 years ago
Tests are failing
Tests are failing
Sorry, I haven't checked the problem yet. At present, it seems that only node version 14 is passed.
Tests are failing
I found the reason, because JSDOM WeakRef currently supports V14.6.0+ , can I Mock one manually? As a downgrade solution to handle Node versions?
Unfortunately, I have not found a solution on how to simulate the behavior of WeakRef
. At present, because JSOM
simulation is limited to Node V14.6.0+
, the test of the lower version fails, so I can only temporarily close this PR
, thank you for your understanding
https://github.com/ungap/weakrefs/blob/master/cjs/index.js perhaps it can try mock in node env
Although the use case must be run on a low version node environment, the minimum requirement for WeakRef is Node V14.6.0, so I don't think it is necessary to create a mock use case for it on a low version Node.
Record: JSDOM@latest will reported error in ci with Node V10.
Tests all pass, @sindresorhus 🥳
Can you fix the merge conflict?
Can you fix the merge conflict?
Ok. Had fixed!But I encountered a very strange problem. Line 343 is a blank line, but lint reported an error. I repeatedly checked the code and found no problems. Can I ask for your help.
I suggest we just embed the WeakRef
type so we don't have to require a higher target.
interface WeakRef<T extends object> {
readonly [Symbol.toStringTag]: "WeakRef";
/**
* Returns the WeakRef instance's target object, or undefined if the target object has been
* reclaimed.
*/
deref(): T | undefined;
}
I suggest we just embed the
WeakRef
type so we don't have to require a higher target.interface WeakRef<T extends object> { readonly [Symbol.toStringTag]: "WeakRef"; /** * Returns the WeakRef instance's target object, or undefined if the target object has been * reclaimed. */ deref(): T | undefined; }
done
Can you fix the merge conflict?
Ok. Had fixed!But I encountered a very strange problem. Line 343 is a blank line, but lint reported an error. I repeatedly checked the code and found no problems. Can I ask for your help.
Thank you so much, I just noticed that I read the wrong file, it is a lint problem in another file, sorry, sorry for the trouble, I will be more careful next time
@sindresorhus done other
PR
to replace #164