Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

589 B
Raw Blame
import userSchema from './user';

describe('userSchema', () => {
  describe('credentialsChangedAt', () => {
    it('is a Date path so a password reset can persist the access-token cutoff', () => {
      const path = userSchema.path('credentialsChangedAt');

      expect(path).toBeDefined();
      expect(path.instance).toBe('Date');
    });

    it('is writable through a strict-mode update', () => {
      const changedAt = new Date(1700000010500);
      const update = userSchema.path('credentialsChangedAt').cast(changedAt);

      expect(update).toEqual(changedAt);
    });
  });
});