Sha256: 0e42fe85aa45080f053762a261a1a803bd10d430b3d2cce3522d0dde30179f37

Contents?: true

Size: 1.08 KB

Versions: 13

Compression:

Stored size: 1.08 KB

Contents

import {
  inbox_message_attachment_path,
  inboxes_path,
  serialize,
  configure,
  config,
} from "./routes.spec";

// Route Helpers
inboxes_path();
inboxes_path({
  locale: "en",
  search: {
    q: "ukraine",
    page: 3,
    keywords: ["large", "small", { advanced: true }],
  },
});

inbox_message_attachment_path(1, "2", true);
inbox_message_attachment_path(
  { id: 1 },
  { to_param: () => "2" },
  { toParam: () => true }
);
inbox_message_attachment_path(1, "2", true, { format: "json" });
inboxes_path.toString();
inboxes_path.requiredParams();

// serialize test
const SerializerArgument = {
  locale: "en",
  search: {
    q: "ukraine",
    page: 3,
    keywords: ["large", "small", { advanced: true }],
  },
};
serialize(SerializerArgument);
config().serializer(SerializerArgument);

// configure test
configure({
  default_url_options: { port: 1, host: null },
  prefix: "",
  special_options_key: "_options",
  serializer: (value) => JSON.stringify(value),
});

// config tests
const Config = config();
console.log(
  Config.prefix,
  Config.default_url_options,
  Config.special_options_key
);

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
js-routes-2.2.9 spec/js_routes/module_types/dts/test.spec.ts
js-routes-2.2.8 spec/js_routes/module_types/dts/test.spec.ts
js-routes-2.2.7 spec/js_routes/module_types/dts/test.spec.ts
js-routes-2.2.6 spec/js_routes/module_types/dts/test.spec.ts
js-routes-2.2.5 spec/js_routes/module_types/dts/test.spec.ts
js-routes-2.2.4 spec/js_routes/module_types/dts/test.spec.ts
js-routes-2.2.3 spec/js_routes/module_types/dts/test.spec.ts
js-routes-2.2.2 spec/js_routes/module_types/dts/test.spec.ts
js-routes-2.2.1 spec/js_routes/module_types/dts/test.spec.ts
js-routes-2.2.0 spec/js_routes/module_types/dts/test.spec.ts
js-routes-2.1.2 spec/js_routes/module_types/dts/test.spec.ts
js-routes-2.1.1 spec/js_routes/module_types/dts/test.spec.ts
js-routes-2.1.0 spec/js_routes/module_types/dts/test.spec.ts