Steven Silvester 6 лет назад
Родитель
Сommit
b3218504ee
3 измененных файлов с 21 добавлено и 0 удалено
  1. 5 0
      examples/chrome-example-test.js
  2. 9 0
      examples/example_check.py
  3. 7 0
      examples/test_examples.py

+ 5 - 0
examples/chrome-example-test.js

@@ -1,3 +1,8 @@
+/**
+ * A puppeteer test that launches an example app and makes sure
+ * there are no console errors or uncaught errors prior to a sentinal
+ * string being printed.
+ */
 const puppeteer = require('puppeteer');
 const inspect = require('util').inspect;
 const URL = process.argv[2];

+ 9 - 0
examples/example_check.py

@@ -1,5 +1,14 @@
 
 # -*- coding: utf-8 -*-
+"""
+This file is mean to be called with a path to an example directory as
+its argument.  We import the application entry point for the example
+and add instrument them with a puppeteer test that makes sure
+there are no console errors or uncaught errors prior to a sentinal
+string being printed.
+
+e.g. python example_check.py ./app
+"""
 from concurrent.futures import ThreadPoolExecutor
 import importlib.util
 from os import path as osp

+ 7 - 0
examples/test_examples.py

@@ -1,5 +1,12 @@
 
 # -*- coding: utf-8 -*-
+"""
+This file is meant to be used to test all of the example here and and
+in ../packages/services/examples.  We import each of the applications
+and add instrument them with a puppeteer test that makes sure
+there are no console errors or uncaught errors prior to a sentinal
+string being printed.
+"""
 import glob
 import os.path as osp
 import subprocess