progress on migrating to heex templates and font-icons

This commit is contained in:
Adam Piontek 2022-08-13 07:32:36 -04:00
commit 3eff955672
21793 changed files with 2161968 additions and 16895 deletions
assets_old/node_modules/wildcard/test

3
assets_old/node_modules/wildcard/test/all.js generated vendored Executable file
View file

@ -0,0 +1,3 @@
require('./arrays');
require('./objects');
require('./strings');

33
assets_old/node_modules/wildcard/test/arrays.js generated vendored Executable file
View file

@ -0,0 +1,33 @@
var test = require('tape'),
wildcard = require('../'),
testdata = [
'a.b.c',
'a.b',
'a',
'a.b.d'
],
testdataSep = [
'a:b:c',
'a:b',
'a',
'a:b:d'
];
test('array result matching tests', function(t) {
t.plan(5);
t.equal(wildcard('*', testdata).length, 4, '* matches all testdata');
t.equal(wildcard('a.*', testdata).length, 4, '4 matches found');
t.equal(wildcard('a.b.*', testdata).length, 3, '3 matches found');
t.equal(wildcard('a.*.c', testdata).length, 1);
t.equal(wildcard('b.*.d', testdata).length, 0);
});
test('array result with separator matching tests', function(t) {
t.plan(4);
t.equal(wildcard('a:*', testdataSep, ':').length, 4, '4 matches found');
t.equal(wildcard('a:b:*', testdataSep, ':').length, 3, '3 matches found');
t.equal(wildcard('a:*:c', testdataSep, ':').length, 1);
t.equal(wildcard('b:*:d', testdataSep, ':').length, 0);
});

106
assets_old/node_modules/wildcard/test/objects.js generated vendored Executable file
View file

@ -0,0 +1,106 @@
var wildcard = require('../'),
test = require('tape'),
testdata = {
'a.b.c' : {},
'a.b' : {},
'a' : {},
'a.b.d' : {}
},
testdataSep = {
'a:b:c' : {},
'a:b' : {},
'a' : {},
'a:b:d' : {}
};
test('object result matching tests', function(t) {
t.test('should return 4 matches for a.*', function(t) {
var matches = wildcard('a.*', testdata);
t.plan(4);
t.ok(matches['a.b.c']);
t.ok(matches['a.b']);
t.ok(matches['a']);
t.ok(matches['a.b.d']);
t.end();
});
t.test('should return 4 matches for a:*', function(t) {
var matches = wildcard('a:*', testdataSep, ':');
t.plan(4);
t.ok(matches['a:b:c']);
t.ok(matches['a:b']);
t.ok(matches['a']);
t.ok(matches['a:b:d']);
t.end();
});
t.test('should return 3 matches for a.b.*', function(t) {
var matches = wildcard('a.b.*', testdata);
t.plan(4);
t.ok(matches['a.b.c']);
t.ok(matches['a.b']);
t.notOk(matches['a']);
t.ok(matches['a.b.d']);
t.end();
});
t.test('should return 3 matches for a:b:*', function(t) {
var matches = wildcard('a:b:*', testdataSep, ':');
t.plan(4);
t.ok(matches['a:b:c']);
t.ok(matches['a:b']);
t.notOk(matches['a']);
t.ok(matches['a:b:d']);
t.end();
});
t.test('should return 1 matches for a.*.c', function(t) {
var matches = wildcard('a.*.c', testdata);
t.plan(4);
t.ok(matches['a.b.c']);
t.notOk(matches['a.b']);
t.notOk(matches['a']);
t.notOk(matches['a.b.d']);
t.end();
});
t.test('should return 1 matches for a:*:c', function(t) {
var matches = wildcard('a:*:c', testdataSep, ':');
t.plan(4);
t.ok(matches['a:b:c']);
t.notOk(matches['a:b']);
t.notOk(matches['a']);
t.notOk(matches['a:b:d']);
t.end();
});
t.test('should return 0 matches for b.*.d', function(t) {
var matches = wildcard('b.*.d', testdata);
t.plan(4);
t.notOk(matches['a.b.c']);
t.notOk(matches['a.b']);
t.notOk(matches['a']);
t.notOk(matches['a.b.d']);
t.end();
});
t.test('should return 0 matches for b:*:d', function(t) {
var matches = wildcard('b:*:d', testdataSep, ':');
t.plan(4);
t.notOk(matches['a:b:c']);
t.notOk(matches['a:b']);
t.notOk(matches['a']);
t.notOk(matches['a:b:d']);
t.end();
});
t.end();
});

46
assets_old/node_modules/wildcard/test/strings.js generated vendored Executable file
View file

@ -0,0 +1,46 @@
var test = require('tape'),
wildcard = require('../');
test('general wild card matching tests', function(t) {
t.plan(8);
t.ok(wildcard('*', 'test'), '* should match test');
t.ok(wildcard('foo.*', 'foo.bar'), 'foo.* should match foo.bar');
t.ok(wildcard('foo.*', 'foo'), 'foo.* should match foo');
t.ok(wildcard('*.foo.com', 'test.foo.com'), 'test.foo.com should match *.foo.com');
t.notOk(wildcard('foo.*', 'bar'), 'foo.* should not match bar');
t.ok(wildcard('a.*.c', 'a.b.c'), 'a.*.c should match a.b.c');
t.notOk(wildcard('a.*.c', 'a.b'), 'a.*.c should not match a.b');
t.notOk(wildcard('a', 'a.b.c'), 'a should not match a.b.c');
});
test('regex wildcard matching tests', function(t) {
t.plan(4);
t.ok(wildcard('*foo', 'foo'), '*foo should match foo');
t.ok(wildcard('*foo.b', 'foo.b'), '*foo.b should match foo.b');
t.ok(wildcard('a.*foo.c', 'a.barfoo.c'), 'a.barfoo.c should match a.*foo.c');
t.ok(wildcard('a.foo*.c', 'a.foobar.c'), 'a.foobar.c should match a.foo*.c');
});
test('general wild card with separator matching tests', function(t) {
t.plan(5);
t.ok(wildcard('foo:*', 'foo:bar', ':'), 'foo:* should match foo:bar');
t.ok(wildcard('foo:*', 'foo', ':'), 'foo:* should match foo');
t.notOk(wildcard('foo:*', 'bar', ':'), 'foo:* should not match bar');
t.ok(wildcard('a:*:c', 'a:b:c', ':'), 'a:*:c should match a:b:c');
t.notOk(wildcard('a:*:c', 'a:b', ':'), 'a:*:c should not match a:b');
});
test('general wild card with tokens being returned', function(t) {
t.plan(5);
var parts = wildcard('foo.*', 'foo.bar');
t.ok(parts);
t.equal(parts.length, 2);
t.equal(parts[0], 'foo');
t.equal(parts[1], 'bar');
parts = wildcard('foo.*', 'not.matching');
t.notOk(parts);
});