teal-runtime-specs

Test suite for teal runtime implementations

Usage no npm install needed!

<script type="module">
  import tealRuntimeSpecs from 'https://cdn.skypack.dev/teal-runtime-specs';
</script>

README

This is the official test suite that teal runtime implementations must pass in order to label themselves as teal compliant.

Work in progress

We are currently in the process of extracting the default JS/DOM runtime from teal core into its own package. In this step we'll also migrate the existing test into this repository.

The goal is that all these runtimes pass the complete test suite:

  • teal-js
  • teal-react
  • teal-php

Example

var test = require('teal-runtime-specs')
var plugin = require('../')

test(function(tl) {

  // set up the runtime
  tl.use(plugin)

  // return a function that renders HTML
  return function(ref, data, cb) {
    var html = tl.render(ref, data)
    cb(null, html)
  }  
})