Skip to content

Commit f172dee

Browse files
committed
fix: The assertions here don’t actually verify that con
Signed-off-by: Zendy <50132805+zendy199x@users.noreply.github.com>
1 parent c34533a commit f172dee

File tree

1 file changed

+11
-26
lines changed

1 file changed

+11
-26
lines changed

tests/plugin-bff.test.ts

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,18 @@
1-
import * as bffPlugin from '../../cli/plugin-bff/src';
2-
import { bffPlugin as bffPluginExport } from '../../cli/plugin-bff/src/cli';
3-
import * as constants from '../../cli/plugin-bff/src/constants';
4-
5-
describe('plugin-bff exports', () => {
6-
test('should export all constants', () => {
7-
expect(constants).toBeDefined();
8-
expect(typeof constants).toBe('object');
9-
});
10-
11-
test('should export bffPlugin function', () => {
12-
expect(bffPluginExport).toBeDefined();
13-
expect(typeof bffPluginExport).toBe('function');
14-
});
15-
16-
test('should properly re-export from index', () => {
1+
{"search": " test('should properly re-export from index', () => {
172
// Test that the index file correctly re-exports everything
183
expect(bffPlugin.bffPlugin).toBe(bffPluginExport);
194

205
// Check that constants are properly exported
216
const exportedConstants = Object.keys(constants);
227
expect(exportedConstants.length).toBeGreaterThan(0);
23-
});
24-
25-
test('should maintain export integrity', () => {
26-
// Verify that the main export includes both exports
27-
const mainExports = Object.keys(bffPlugin);
28-
expect(mainExports).toContain('bffPlugin');
8+
});", "replace": " test('should properly re-export from index', () => {
9+
// Test that the index file correctly re-exports everything
10+
expect(bffPlugin.bffPlugin).toBe(bffPluginExport);
2911

30-
// Should have at least one constant exported
31-
expect(mainExports.length).toBeGreaterThanOrEqual(1);
32-
});
33-
});
12+
// Check that at least one constant is properly re-exported from the index
13+
const exportedConstantEntries = Object.entries(constants);
14+
expect(exportedConstantEntries.length).toBeGreaterThan(0);
15+
const [firstConstantKey, firstConstantValue] = exportedConstantEntries[0];
16+
// The index namespace should expose this constant with the same value
17+
expect(bffPlugin[firstConstantKey]).toBe(firstConstantValue);
18+
});"}

0 commit comments

Comments
 (0)