home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where issue = 776635426 and "updated_at" is on date 2020-12-31 sorted by updated_at descending

✖
✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 2

  • simonw 3
  • dracos 1

author_association 2

  • OWNER 3
  • NONE 1

issue 1

  • Mechanism for executing JavaScript unit tests · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
753033121 https://github.com/simonw/datasette/issues/1165#issuecomment-753033121 https://api.github.com/repos/simonw/datasette/issues/1165 MDEyOklzc3VlQ29tbWVudDc1MzAzMzEyMQ== dracos 154364 2020-12-31T19:33:47Z 2020-12-31T19:33:47Z NONE

Sorry to go on about it, but it's my only example ;) And thought it might be of interest/use. Here is FixMyStreet's Cypress workflow https://github.com/mysociety/fixmystreet/blob/master/.github/workflows/cypress.yml with the master script that sets up server etc at https://github.com/mysociety/fixmystreet/blob/master/bin/browser-tests (that has features such as working inside/outside Vagrant, and can do JS code coverage) and then the tests are at https://github.com/mysociety/fixmystreet/tree/master/.cypress/cypress/integration

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for executing JavaScript unit tests 776635426  
752846267 https://github.com/simonw/datasette/issues/1165#issuecomment-752846267 https://api.github.com/repos/simonw/datasette/issues/1165 MDEyOklzc3VlQ29tbWVudDc1Mjg0NjI2Nw== simonw 9599 2020-12-31T05:10:41Z 2020-12-31T05:13:14Z OWNER

https://github.com/PostHog/posthog/tree/master/cypress/integration has some useful examples, linked from this article: https://posthog.com/blog/cypress-end-to-end-tests

Also useful: their workflow https://github.com/PostHog/posthog/blob/master/.github/workflows/e2e.yml

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for executing JavaScript unit tests 776635426  
752839433 https://github.com/simonw/datasette/issues/1165#issuecomment-752839433 https://api.github.com/repos/simonw/datasette/issues/1165 MDEyOklzc3VlQ29tbWVudDc1MjgzOTQzMw== simonw 9599 2020-12-31T04:29:40Z 2020-12-31T04:29:40Z OWNER

Important to absorb the slightly bizarre assertion syntax from Chai - docs here https://www.chaijs.com/api/bdd/

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for executing JavaScript unit tests 776635426  
752828851 https://github.com/simonw/datasette/issues/1165#issuecomment-752828851 https://api.github.com/repos/simonw/datasette/issues/1165 MDEyOklzc3VlQ29tbWVudDc1MjgyODg1MQ== simonw 9599 2020-12-31T03:19:38Z 2020-12-31T03:19:38Z OWNER

I got Cypress working! I added the datasette.plugins code to the table template and ran a test called plugins.spec.js using the following: javascript context('datasette.plugins API', () => { beforeEach(() => { cy.visit('/fixtures/compound_three_primary_keys') }); it('should exist', () => { let datasette; cy.window().then(win => { datasette = win.datasette; }).then(() => { expect(datasette).to.exist; expect(datasette.plugins).to.exist; }); }); it('should register and execute plugins', () => { let datasette; cy.window().then(win => { datasette = win.datasette; }).then(() => { expect(datasette.plugins.call('numbers')).to.deep.equal([]); // Register a plugin datasette.plugins.register("numbers", (a, b) => a + b, ['a', 'b']); var result = datasette.plugins.call("numbers", {a: 1, b: 2}); expect(result).to.deep.equal([3]); // Second plugin datasette.plugins.register("numbers", (a, b) => a * b, ['a', 'b']); var result2 = datasette.plugins.call("numbers", {a: 1, b: 2}); expect(result2).to.deep.equal([3, 2]); }); }); });

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Mechanism for executing JavaScript unit tests 776635426  

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
, [performed_via_github_app] TEXT);
CREATE INDEX [idx_issue_comments_issue]
                ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
                ON [issue_comments] ([user]);
Powered by Datasette · Queries took 22.589ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows