Skip to content
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

WIP: deno support #657

Open
wants to merge 13 commits into
base: master
from

Conversation

@alexjeffburke
Copy link
Member

commented Aug 5, 2019

This PR worked on by @papandreou and myself implements a working port to Unexpected to deno. The changes involved are the creation of an esm build and some porting work to enable colour terminal support in magicpen (sunesimonsen/magicpen#26) plus unexpected-magicpen (unexpectedjs/unexpected-magicpen#19) to support the test suite.

As for the why of it - as a very new platform deno doesn’t yet have a fully featured assertion library and our discussions noted that, should it be possible to do so without being too invasive, we might gain some interesting exposure on that platform. The challenge was to see what the porting effort would be - and this showcases it.

papandreou and others added some commits Aug 4, 2019

@@ -8,3 +8,5 @@
/.nyc_output/
/unexpected.js
/unexpected.js.map
/unexpected-deno.js

This comment has been minimized.

Copy link
@alexjeffburke

alexjeffburke Aug 5, 2019

Author Member

If we do end up generating this, I wonder if we should just call the file esm and the. allow users to import expect from “unexpected/esm".

Also need to check what the options are for making these files accessible to the deno registry.

This comment has been minimized.

Copy link
@papandreou

papandreou Aug 5, 2019

Member

import expect from “unexpected/esm" won't really help deno users, as they aren't using npm. It seems like we'll need to get unexpected added to https://github.com/denoland/registry/blob/master/src/database.json, check the generated file into git, and then hand out a url like https://deno.land/x/unexpected/unexpected-deno.js

This comment has been minimized.

Copy link
@alexjeffburke

alexjeffburke Aug 9, 2019

Author Member

That’s a fair point - currently the deno registry is limited to pointing you to the project but the you must be able to import a file that is checked in. That said, the esm build is still generic so if we do check it in I think we should consider renaming :)

This comment has been minimized.

Copy link
@papandreou

papandreou Aug 9, 2019

Member

Absolutely, not a lot of thought went into the name :)

@@ -0,0 +1,3 @@
import expect from './unexpected-deno.js';

This comment has been minimized.

Copy link
@alexjeffburke

alexjeffburke Aug 5, 2019

Author Member

Ideally this would execute the full battery of tests we have - got some early work in the direction of trying to get the real suite running.

@alexjeffburke alexjeffburke force-pushed the feature/deno branch from 694727a to fa0f1a6 Aug 9, 2019

@alexjeffburke alexjeffburke force-pushed the feature/deno branch from 058edc5 to a77a561 Aug 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.