Login
repo.test.s2 at [962200c936]
Login

File bindings/s2/require.d/fsl/util/repo.test.s2 artifact 2b6f33c70e part of check-in 962200c936


/**
   In-progress set of utilities for working with repo db tables.
*/
requireS2(['fsl/db/checkout'/*force repo db open*/,'fsl/util/repo'],
proc(ignored, repo){
    const db = repo.db;
    affirm db;
    affirm repo.getUserList;
    var x = repo.getUserList();
    affirm 'array' === typename x;
    affirm x.length() > 0;
    affirm x.indexOf('anonymous') >= 0;

    x = repo.getConfig('project-name');
    affirm 'string' === typename x;
    x = repo.getConfig('no-such-key');
    affirm undefined === x;
    affirm catch{repo.getConfig()}.message.indexOf("'string'") >0;
});