Beispiel #1
0
tap.equal(is("wa’maH wej").thirteen(), true); // Klingon
tap.equal(is("trinajst").thirteen(), true); // Slovenian
tap.equal(is("trece").thirteen(), true); // Spanish
tap.equal(is("dektri").thirteen(), true); // Speranto
tap.equal(is("trese").thirteen(), true); // Tagalog
tap.equal(is("tretton").thirteen(), true); // Swedish
tap.equal(is("பதின்மூன்று").thirteen(), true); // Tamil
tap.equal(is("สิบสาม").thirteen(), true); // Thai
tap.equal(is("тринадцять").thirteen(), true); // Ukrainian
tap.equal(is("تیرہ").thirteen(), true); // Urdu
tap.equal(is("tri ar ddeg").thirteen(), true); // Welsh
tap.equal(is("דרייַצן").thirteen(), true); // Yiddish
tap.equal(is("דרייצן").thirteen(), true); // Yiddish (without diacritics),
tap.equal(is("kumi na tatu").thirteen(), true); // Swahili
tap.equal(is("പതിമൂന്ന്").thirteen(), true); // Malayalam
tap.equals(is("१३").thirteen(), true); //Devanagari
tap.equals(is("तेह्र").thirteen(), true); //Nepali
tap.equal(is("quainel").thirteen(), true); // Quenya
tap.equal(is("mînuiug").thirteen(), true); // Sindarin

tap.equal(is("B").thirteen(), true); // B looks like 13
tap.equal(is("b").thirteen(), false); // b does not look like 13
tap.equal(is("ß").thirteen(), true); // German: looks like 13
tap.equal(is("ẞ").thirteen(), true); // German: looks like 13
tap.equal(is("Β").thirteen(), true); // Upper case beta, looks like 13
tap.equal(is("β").thirteen(), true); // lower case beta
tap.equal(is("阝").thirteen(), true); // Chinese Kangxi radical: Looks like 13

tap.equal(is("i3").thirteen(),true); //i3 looks like 13 when upper case
tap.equal(is("I3").thirteen(),true); //I3 looks like 13
tap.equal(is("l3").thirteen(),true); //l3 looks like 13
Beispiel #2
0
tap.equal(is("trinásť").thirteen(), true); // Slovak
tap.equal(is("wa’maH wej").thirteen(), true); // Klingon
tap.equal(is("trinajst").thirteen(), true); // Slovenian
tap.equal(is("trece").thirteen(), true); // Spanish
tap.equal(is("dektri").thirteen(), true); // Speranto
tap.equal(is("trese").thirteen(), true); // Tagalog
tap.equal(is("tretton").thirteen(), true); // Swedish
tap.equal(is("பதின்மூன்று").thirteen(), true); // Tamil
tap.equal(is("สิบสาม").thirteen(), true); // Thai
tap.equal(is("тринадцять").thirteen(), true); // Ukrainian
tap.equal(is("تیرہ").thirteen(), true); // Urdu
tap.equal(is("tri ar ddeg").thirteen(), true); // Welsh
tap.equal(is("דרייַצן").thirteen(), true); // Yiddish
tap.equal(is("דרייצן").thirteen(), true); // Yiddish (without diacritics),
tap.equal(is("kumi na tatu").thirteen(), true); // Swahili
tap.equals(is("१३").thirteen(), true); //Devanagari
tap.equals(is("तेह्र").thirteen(), true); //Nepali
tap.equal(is("quainel").thirteen(), true); // Quenya
tap.equal(is("mînuiug").thirteen(), true); // Sindarin

tap.equal(is("B").thirteen(), true); // B looks like 13
tap.equal(is("b").thirteen(), true); // b looks like 13 when upper case

tap.equal(is("β").thirteen(), true); // β looks like 13

tap.equal(is("i3").thirteen(),true); //i3 looks like 13 when upper case
tap.equal(is("I3").thirteen(),true); //I3 looks like 13
tap.equal(is("l3").thirteen(),true); //l3 looks like 13
tap.equal(is("L3").thirteen(),true); //l3 looks like 13 when lower case
tap.equal(is("|3").thirteen(),true); //|3 looks like 13
Beispiel #3
0
/* Copyright 2015, Yahoo Inc.
   Copyrights licensed under the MIT License.
   See the accompanying LICENSE file for terms. */

var t = require('tap');

var MendelWalker = require('../packages/mendel-core/tree-walker');

var walker = MendelWalker();

t.equals(walker.constructor, MendelWalker, 'constructor');

var shallowModule = {
    id: 'root',
    index: 0,
    data: [{
        id: 'stubData',
        sha: '010203',
    }],
};

t.equals(walker.find(shallowModule).id, 'stubData',
    'Shallow module won\'t call _resolveBranch');

t.equals(walker.find({index:0}).id, 'stubData',
    'Caches result by index');

t.throws(function() {
    walker.find({index:1, data:[1,2]});
},
'Throws if _resolveBranch not implemented by subclass');
Beispiel #4
0
var t = require('tap');

var MendelWalker = require('../packages/mendel-core/tree-walker');

var walker = MendelWalker();

t.equals(walker.constructor, MendelWalker, 'constructor');

var shallowModule = {
    id: "root",
    index: 0,
    data: [{
        id: "stubData",
        sha: "010203"
    }]
};

t.equals(walker.find(shallowModule).id, "stubData",
    "Shallow module won't call _resolveBranch");

t.equals(walker.find({index:0}).id, "stubData",
    "Caches result by index");

t.throws(function() {
    walker.find({index:1, data:[1,2]});
},
"Throws if _resolveBranch not implemented by subclass");

var branchModule = {
    id: "leaf1",
    index: 2,
Beispiel #5
0
  }
  touch() {
  }
  myQuery() {
    return {
      type: 'query response',
      name: this.name,
      email: this.email,
    };
  }
}

// console.log('CREATING INSTACE A');
const a = new TestEntity();

tap.equals(Entity.inspect(a).version, 0, 'Instance version should be 0');
tap.equals(a.name, fixtures.a.name, `Instance name should be ${fixtures.a.name}`);


a.rename(fixtures.b.name);
tap.equals(Entity.inspect(a).version, 1, 'Instance version should be 1');
tap.equals(a.name, fixtures.b.name, `Instance name should be ${fixtures.b.name}`);

a.save();
tap.equals(Entity.inspect(a).version, 2, 'Instance version should be 2');
tap.equals(Entity.inspect(a).history.length, 2, 'Instance history should contain 2 entries');

a.touch();
tap.equals(Entity.inspect(a).version, 2, 'Instance version should be 2');
tap.equals(Entity.inspect(a).history.length, 2, 'Instance history should contain 2 entries');