How to use the angular-ui-router.Glob function in angular-ui-router

To help you get started, we’ve selected a few angular-ui-router examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ui-router / core / test / globSpec.js View on Github external
var uiRouter = require("angular-ui-router");
var Glob = uiRouter.Glob;

describe('Glob', function() {
  it('should match glob strings', function() {
    expect(Glob.is('*')).toBe(true);
    expect(Glob.is('**')).toBe(true);
    expect(Glob.is('*.*')).toBe(true);

    expect(Glob.is('')).toBe(false);
    expect(Glob.is('.')).toBe(false);
  });

  it('should construct glob matchers', function() {
    expect(Glob.fromString('')).toBeNull();

    var state = 'about.person.item';