Skip to content

Instantly share code, notes, and snippets.

View kaidatavis's full-sized avatar
💭
Building visual interface for LLMs while teaching data vis with the Observable

Kai Xu kaidatavis

💭
Building visual interface for LLMs while teaching data vis with the Observable
  • University of Nottingham
  • Nottingham, UK
View GitHub Profile
@stevenqzhang
stevenqzhang / jasmine_chrome_tests.md
Last active June 26, 2017 18:37 — forked from ecmendenhall/jasmine_chrome_tests.md
Integrating the Jasmine test runner for Chrome extension development

[Jasmine][jas] is an excellent framework for JavaScript testing, but I had a tough time coaxing it into cooperation with the Chrome extension I was developing. Jasmine's default testrunner uses an inline script block that listens for window.onload to setup the test environment, but Chrome prohibits extensions from running inline code. Alas, it's not as easy as importing the inline code as a separate file. After a little tinkering, this is what I came up with:

Extension
    ├── html
    ├── js 
    ├── manifest.json
    └── tests
        ├── jasmine
        │   └── lib

│   └── jasmine-2.5.2