UNPKG

rizzo-next

Version:

The next generation of Lonely Planet's style guide and pattern library.

1,544 lines (1,543 loc) 188 kB
{ "type": "Program", "start": 0, "end": 1582, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 70, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 54, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 54 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 11, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 11 } }, "local": { "type": "Identifier", "start": 7, "end": 11, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 11 } }, "name": "User" } } ], "importKind": "value", "source": { "type": "Literal", "start": 17, "end": 53, "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 53 } }, "value": "../../../src/components/login/user", "rawValue": "../../../src/components/login/user", "raw": "\"../../../src/components/login/user\"" } }, { "type": "VariableDeclaration", "start": 56, "end": 133, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 77 } }, "declarations": [ { "type": "VariableDeclarator", "start": 60, "end": 132, "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 76 } }, "id": { "type": "Identifier", "start": 60, "end": 68, "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 12 } }, "name": "Injector" }, "init": { "type": "CallExpression", "start": 71, "end": 132, "loc": { "start": { "line": 3, "column": 15 }, "end": { "line": 3, "column": 76 } }, "callee": { "type": "Identifier", "start": 71, "end": 78, "loc": { "start": { "line": 3, "column": 15 }, "end": { "line": 3, "column": 22 } }, "name": "require" }, "arguments": [ { "type": "Literal", "start": 79, "end": 131, "loc": { "start": { "line": 3, "column": 23 }, "end": { "line": 3, "column": 75 } }, "value": "inject!../../../src/components/login/login_manager", "rawValue": "inject!../../../src/components/login/login_manager", "raw": "\"inject!../../../src/components/login/login_manager\"" } ] } } ], "kind": "let" }, { "type": "VariableDeclaration", "start": 135, "end": 161, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 26 } }, "declarations": [ { "type": "VariableDeclarator", "start": 139, "end": 160, "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 25 } }, "id": { "type": "Identifier", "start": 139, "end": 146, "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 11 } }, "name": "doneSpy" }, "init": { "type": "CallExpression", "start": 149, "end": 160, "loc": { "start": { "line": 5, "column": 14 }, "end": { "line": 5, "column": 25 } }, "callee": { "type": "MemberExpression", "start": 149, "end": 158, "loc": { "start": { "line": 5, "column": 14 }, "end": { "line": 5, "column": 23 } }, "object": { "type": "Identifier", "start": 149, "end": 154, "loc": { "start": { "line": 5, "column": 14 }, "end": { "line": 5, "column": 19 } }, "name": "sinon" }, "property": { "type": "Identifier", "start": 155, "end": 158, "loc": { "start": { "line": 5, "column": 20 }, "end": { "line": 5, "column": 23 } }, "name": "spy" }, "computed": false }, "arguments": [] } } ], "kind": "let" }, { "type": "VariableDeclaration", "start": 162, "end": 188, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 26 } }, "declarations": [ { "type": "VariableDeclarator", "start": 166, "end": 187, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 25 } }, "id": { "type": "Identifier", "start": 166, "end": 173, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 11 } }, "name": "failSpy" }, "init": { "type": "CallExpression", "start": 176, "end": 187, "loc": { "start": { "line": 6, "column": 14 }, "end": { "line": 6, "column": 25 } }, "callee": { "type": "MemberExpression", "start": 176, "end": 185, "loc": { "start": { "line": 6, "column": 14 }, "end": { "line": 6, "column": 23 } }, "object": { "type": "Identifier", "start": 176, "end": 181, "loc": { "start": { "line": 6, "column": 14 }, "end": { "line": 6, "column": 19 } }, "name": "sinon" }, "property": { "type": "Identifier", "start": 182, "end": 185, "loc": { "start": { "line": 6, "column": 20 }, "end": { "line": 6, "column": 23 } }, "name": "spy" }, "computed": false }, "arguments": [] } } ], "kind": "let" }, { "type": "VariableDeclaration", "start": 190, "end": 273, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 12, "column": 5 } }, "declarations": [ { "type": "VariableDeclarator", "start": 194, "end": 272, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 12, "column": 4 } }, "id": { "type": "Identifier", "start": 194, "end": 202, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 12 } }, "name": "ajaxMock" }, "init": { "type": "CallExpression", "start": 205, "end": 272, "loc": { "start": { "line": 8, "column": 15 }, "end": { "line": 12, "column": 4 } }, "callee": { "type": "MemberExpression", "start": 205, "end": 228, "loc": { "start": { "line": 8, "column": 15 }, "end": { "line": 9, "column": 10 } }, "object": { "type": "CallExpression", "start": 205, "end": 217, "loc": { "start": { "line": 8, "column": 15 }, "end": { "line": 8, "column": 27 } }, "callee": { "type": "MemberExpression", "start": 205, "end": 215, "loc": { "start": { "line": 8, "column": 15 }, "end": { "line": 8, "column": 25 } }, "object": { "type": "Identifier", "start": 205, "end": 210, "loc": { "start": { "line": 8, "column": 15 }, "end": { "line": 8, "column": 20 } }, "name": "sinon" }, "property": { "type": "Identifier", "start": 211, "end": 215, "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 25 } }, "name": "stub" }, "computed": false }, "arguments": [] }, "property": { "type": "Identifier", "start": 221, "end": 228, "loc": { "start": { "line": 9, "column": 3 }, "end": { "line": 9, "column": 10 } }, "name": "returns" }, "computed": false }, "arguments": [ { "type": "ObjectExpression", "start": 229, "end": 271, "loc": { "start": { "line": 9, "column": 11 }, "end": { "line": 12, "column": 3 } }, "properties": [ { "type": "Property", "start": 235, "end": 248, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 17 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 235, "end": 239, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 8 } }, "name": "done" }, "value": { "type": "Identifier", "start": 241, "end": 248, "loc": { "start": { "line": 10, "column": 10 }, "end": { "line": 10, "column": 17 } }, "name": "doneSpy" }, "kind": "init" }, { "type": "Property", "start": 254, "end": 267, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 17 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 254, "end": 258, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 8 } }, "name": "fail" }, "value": { "type": "Identifier", "start": 260, "end": 267, "loc": { "start": { "line": 11, "column": 10 }, "end": { "line": 11, "column": 17 } }, "name": "failSpy" }, "kind": "init" } ] } ] } } ], "kind": "let" }, { "type": "VariableDeclaration", "start": 275, "end": 344, "loc": { "start": { "line": 14, "column": 0 }, "end": { "line": 18, "column": 2 } }, "declarations": [ { "type": "VariableDeclarator", "start": 279, "end": 344, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 18, "column": 2 } }, "id": { "type": "Identifier", "start": 279, "end": 291, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 16 } }, "name": "LoginManager" }, "init": { "type": "CallExpression", "start": 294, "end": 344, "loc": { "start": { "line": 14, "column": 19 }, "end": { "line": 18, "column": 2 } }, "callee": { "type": "Identifier", "start": 294, "end": 302, "loc": { "start": { "line": 14, "column": 19 }, "end": { "line": 14, "column": 27 } }, "name": "Injector" }, "arguments": [ { "type": "ObjectExpression", "start": 303, "end": 343, "loc": { "start": { "line": 14, "column": 28 }, "end": { "line": 18, "column": 1 } }, "properties": [ { "type": "Property", "start": 307, "end": 341, "loc": { "start": { "line": 15, "column": 2 }, "end": { "line": 17, "column": 3 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Literal", "start": 307, "end": 315, "loc": { "start": { "line": 15, "column": 2 }, "end": { "line": 15, "column": 10 } }, "value": "jquery", "rawValue": "jquery", "raw": "\"jquery\"" }, "value": { "type": "ObjectExpression", "start": 317, "end": 341, "loc": { "start": { "line": 15, "column": 12 }, "end": { "line": 17, "column": 3 } }, "properties": [ { "type": "Property", "start": 323, "end": 337, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 18 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 323, "end": 327, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 8 } }, "name": "ajax" }, "value": { "type": "Identifier", "start": 329, "end": 337, "loc": { "start": { "line": 16, "column": 10 }, "end": { "line": 16, "column": 18 } }, "name": "ajaxMock" }, "kind": "init" } ] }, "kind": "init" } ] } ] } } ], "kind": "let" }, { "type": "ExpressionStatement", "start": 347, "end": 1581, "loc": { "start": { "line": 21, "column": 0 }, "end": { "line": 69, "column": 3 } }, "expression": { "type": "CallExpression", "start": 347, "end": 1580, "loc": { "start": { "line": 21, "column": 0 }, "end": { "line": 69, "column": 2 } }, "callee": { "type": "Identifier", "start": 347, "end": 355, "loc": { "start": { "line": 21, "column": 0 }, "end": { "line": 21, "column": 8 } }, "name": "describe" }, "arguments": [ { "type": "Literal", "start": 356, "end": 371, "loc": { "start": { "line": 21, "column": 9 }, "end": { "line": 21, "column": 24 } }, "value": "login manager", "rawValue": "login manager", "raw": "\"login manager\"" }, { "type": "ArrowFunctionExpression", "start": 373, "end": 1579, "loc": { "start": { "line": 21, "column": 26 }, "end": { "line": 69, "column": 1 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 379, "end": 1579, "loc": { "start": { "line": 21, "column": 32 }, "end": { "line": 69, "column": 1 } }, "body": [ { "type": "ExpressionStatement", "start": 383, "end": 479, "loc": { "start": { "line": 22, "column": 2 }, "end": { "line": 24, "column": 5 } }, "expression": { "type": "CallExpression", "start": 383, "end": 478, "loc": { "start": { "line": 22, "column": 2 }, "end": { "line": 24, "column": 4 } }, "callee": { "type": "Identifier", "start": 383, "end": 385, "loc": { "start": { "line": 22, "column": 2 }, "end": { "line": 22, "column": 4 } }, "name": "it" }, "arguments": [ { "type": "Literal", "start": 386, "end": 405, "loc": { "start": { "line": 22, "column": 5 }, "end": { "line": 22, "column": 24 } }, "value": "should be a class", "rawValue": "should be a class", "raw": "\"should be a class\"" }, { "type": "ArrowFunctionExpression", "start": 407, "end": 477, "loc": { "start": { "line": 22, "column": 26 }, "end": { "line": 24, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 413, "end": 477, "loc": { "start": { "line": 22, "column": 32 }, "end": { "line": 24, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 419, "end": 473, "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 23, "column": 58 } }, "expression": { "type": "CallExpression", "start": 419, "end": 472, "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 23, "column": 57 } }, "callee": { "type": "MemberExpression", "start": 419, "end": 470, "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 23, "column": 55 } }, "object": { "type": "MemberExpression", "start": 419, "end": 467, "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 23, "column": 52 } }, "object": { "type": "MemberExpression", "start": 419, "end": 464, "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 23, "column": 49 } }, "object": { "type": "CallExpression", "start": 419, "end": 461, "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 23, "column": 46 } }, "callee": { "type": "Identifier", "start": 419, "end": 425, "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 23, "column": 10 } }, "name": "expect" }, "arguments": [ { "type": "BinaryExpression", "start": 426, "end": 460, "loc": { "start": { "line": 23, "column": 11 }, "end": { "line": 23, "column": 45 } }, "left": { "type": "UnaryExpression", "start": 426, "end": 445, "loc": { "start": { "line": 23, "column": 11 }, "end": { "line": 23, "column": 30 } }, "operator": "typeof", "prefix": true, "argument": { "type": "Identifier", "start": 433, "end": 445, "loc": { "start": { "line": 23, "column": 18 }, "end": { "line": 23, "column": 30 } }, "name": "LoginManager" } }, "operator": "===", "right": { "type": "Literal", "start": 450, "end": 460, "loc": { "start": { "line": 23, "column": 35 }, "end": { "line": 23, "column": 45 } }, "value": "function", "rawValue": "function", "raw": "\"function\"" } } ] }, "property": { "type": "Identifier", "start": 462, "end": 464, "loc": { "start": { "line": 23, "column": 47 }, "end": { "line": 23, "column": 49 } }, "name": "to" }, "computed": false }, "property": { "type": "Identifier", "start": 465, "end": 467, "loc": { "start": { "line": 23, "column": 50 }, "end": { "line": 23, "column": 52 } }, "name": "be" }, "computed": false }, "property": { "type": "Identifier", "start": 468, "end": 470, "loc": { "start": { "line": 23, "column": 53 }, "end": { "line": 23, "column": 55 } }, "name": "ok" }, "computed": false }, "arguments": [] } } ] } } ], "_esdocTestId": 11, "_esdocTestName": "it11" } }, { "type": "ExpressionStatement", "start": 483, "end": 632, "loc": { "start": { "line": 26, "column": 2 }, "end": { "line": 32, "column": 5 } }, "expression": { "type": "CallExpression", "start": 483, "end": 631, "loc": { "start": { "line": 26, "column": 2 }, "end": { "line": 32, "column": 4 } }, "callee": { "type": "Identifier", "start": 483, "end": 485, "loc": { "start": { "line": 26, "column": 2 }, "end": { "line": 26, "column": 4 } }, "name": "it" }, "arguments": [ { "type": "Literal", "start": 486, "end": 513, "loc": { "start": { "line": 26, "column": 5 }, "end": { "line": 26, "column": 32 } }, "value": "should check for statuses", "rawValue": "should check for statuses", "raw": "\"should check for statuses\"" }, { "type": "ArrowFunctionExpression", "start": 515, "end": 630, "loc": { "start": { "line": 26, "column": 34 }, "end": { "line": 32, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 521, "end": 630, "loc": { "start": { "line": 26, "column": 40 }, "end": { "line": 32, "column": 3 } }, "body": [ { "type": "VariableDeclaration", "start": 527, "end": 558, "loc": { "start": { "line": 27, "column": 4 }, "end": { "line": 27, "column": 35 } }, "declarations": [ { "type": "VariableDeclarator", "start": 531, "end": 557, "loc": { "start": { "line": 27, "column": 8 }, "end": { "line": 27, "column": 34 } }, "id": { "type": "Identifier", "start": 531, "end": 536, "loc": { "start": { "line": 27, "column": 8 }, "end": { "line": 27, "column": 13 } }, "name": "login" }, "init": { "type": "NewExpression", "start": 539, "end": 557, "loc": { "start": { "line": 27, "column": 16 }, "end": { "line": 27, "column": 34 } }, "callee": { "type": "Identifier", "start": 543, "end": 555, "loc": { "start": { "line": 27, "column": 20 }, "end": { "line": 27, "column": 32 } }, "name": "LoginManager" }, "arguments": [] } } ], "kind": "let" }, { "type": "ExpressionStatement", "start": 564, "end": 603, "loc": { "start": { "line": 29, "column": 4 }, "end": { "line": 29, "column": 43 } }, "expression": { "type": "CallExpression", "start": 564, "end": 602, "loc": { "start": { "line": 29, "column": 4 }, "end": { "line": 29, "column": 42 } }, "callee": { "type": "MemberExpression", "start": 564, "end": 600, "loc": { "start": { "line": 29, "column": 4 }, "end": { "line": 29, "column": 40 } },