@aws/agentcore 1.0.0-preview.3 → 1.0.0-preview.5

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.
@@ -87,36 +87,22 @@ describe('Assets Directory Snapshots', () => {
87
87
  });
88
88
  });
89
89
 
90
- describe('Static assets', () => {
90
+ describe.skipIf(assetFiles.filter(f => f.startsWith('static/')).length === 0)('Static assets', () => {
91
91
  const staticFiles = assetFiles.filter(f => f.startsWith('static/'));
92
92
 
93
- if (staticFiles.length > 0) {
94
- it.each(staticFiles)('static/%s should match snapshot', file => {
95
- const content = readFileContent(path.join(ASSETS_DIR, file));
96
- expect(content).toMatchSnapshot();
97
- });
98
- } else {
99
- it('static directory is empty or does not exist', () => {
100
- // Static assets may not exist
101
- expect(true).toBe(true);
102
- });
103
- }
93
+ it.each(staticFiles)('static/%s should match snapshot', file => {
94
+ const content = readFileContent(path.join(ASSETS_DIR, file));
95
+ expect(content).toMatchSnapshot();
96
+ });
104
97
  });
105
98
 
106
- describe('TypeScript assets', () => {
99
+ describe.skipIf(assetFiles.filter(f => f.startsWith('typescript/')).length === 0)('TypeScript assets', () => {
107
100
  const tsFiles = assetFiles.filter(f => f.startsWith('typescript/'));
108
101
 
109
- if (tsFiles.length > 0) {
110
- it.each(tsFiles)('typescript/%s should match snapshot', file => {
111
- const content = readFileContent(path.join(ASSETS_DIR, file));
112
- expect(content).toMatchSnapshot();
113
- });
114
- } else {
115
- it('typescript directory is empty or contains only placeholder files', () => {
116
- // TypeScript assets may not exist yet
117
- expect(true).toBe(true);
118
- });
119
- }
102
+ it.each(tsFiles)('typescript/%s should match snapshot', file => {
103
+ const content = readFileContent(path.join(ASSETS_DIR, file));
104
+ expect(content).toMatchSnapshot();
105
+ });
120
106
  });
121
107
 
122
108
  describe('Root-level assets', () => {