@tricoteuses/senat 3.3.0 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,12 @@
1
1
  // Tests for the agenda.senat.fr API → AgendaEvent mapping (historical schema kept)
2
2
  import { describe, expect, it } from "vitest";
3
3
  import { readFileSync } from "node:fs";
4
- import { fileURLToPath } from "node:url";
5
4
  import path from "node:path";
6
5
  import { apiEventToAgendaEvent, classifyInstance, computeQuantiemes, extractDossierUrl, parseDeadline, } from "../../src/server/agenda_api_mapping.js";
7
6
  import { makeReunionUid } from "../../src/utils/reunion_parsing.js";
8
- const fixturesDir = path.join(path.dirname(fileURLToPath(import.meta.url)), "..", "fixtures", "agenda_api");
7
+ // Resolve fixtures from the project root: this test is also compiled to
8
+ // lib/tests/ by the build, so import.meta.url would point to the wrong place.
9
+ const fixturesDir = path.join(process.cwd(), "tests", "fixtures", "agenda_api");
9
10
  const loadFixture = (name) => JSON.parse(readFileSync(path.join(fixturesDir, name), "utf-8"));
10
11
  describe("classifyInstance", () => {
11
12
  it("maps Séance publique to SP", () => {
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vite").UserConfig;
2
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import { defineConfig } from "vitest/config";
2
+ export default defineConfig({
3
+ test: {
4
+ include: ["tests/**/*.test.ts"],
5
+ },
6
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tricoteuses/senat",
3
- "version": "3.3.0",
3
+ "version": "3.3.1",
4
4
  "description": "Handle French Sénat's open data",
5
5
  "keywords": [
6
6
  "France",